GridCal 5.1.4__tar.gz → 5.1.5__tar.gz
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.
- {GridCal-5.1.4 → GridCal-5.1.5}/GridCal/Gui/Diagrams/DiagramEditorWidget/diagram_editor_widget.py +366 -311
- GridCal-5.1.5/GridCal/Gui/Diagrams/MapWidget/Schema/Line.py +46 -0
- {GridCal-5.1.4 → GridCal-5.1.5}/GridCal/Gui/Diagrams/MapWidget/Schema/Nodes.py +7 -3
- GridCal-5.1.5/GridCal/Gui/Diagrams/MapWidget/Schema/SchemaManager.py +58 -0
- GridCal-5.1.5/GridCal/Gui/Diagrams/MapWidget/Schema/Substations.py +153 -0
- {GridCal-5.1.4 → GridCal-5.1.5}/GridCal/Gui/Diagrams/MapWidget/grid_map_widget.py +39 -1
- {GridCal-5.1.4 → GridCal-5.1.5}/GridCal/Gui/Diagrams/MapWidget/map_widget.py +1 -1
- {GridCal-5.1.4 → GridCal-5.1.5}/GridCal/Gui/Main/ConsoleLog.py +1 -1
- {GridCal-5.1.4 → GridCal-5.1.5}/GridCal/Gui/Main/MainWindow.py +469 -448
- {GridCal-5.1.4 → GridCal-5.1.5}/GridCal/Gui/Main/SubClasses/Model/objects.py +15 -0
- {GridCal-5.1.4 → GridCal-5.1.5}/GridCal/Gui/Main/SubClasses/Model/time_events.py +8 -1
- {GridCal-5.1.4 → GridCal-5.1.5}/GridCal/Gui/Main/SubClasses/Settings/configuration.py +12 -3
- {GridCal-5.1.4 → GridCal-5.1.5}/GridCal/Gui/Main/SubClasses/io.py +1 -0
- GridCal-5.1.5/GridCal/Gui/Main/icons_rc.py +28532 -0
- {GridCal-5.1.4 → GridCal-5.1.5}/GridCal/__version__.py +1 -1
- {GridCal-5.1.4 → GridCal-5.1.5}/PKG-INFO +1 -1
- {GridCal-5.1.4 → GridCal-5.1.5}/setup.py +1 -1
- GridCal-5.1.4/GridCal/Gui/Diagrams/MapWidget/Schema/SchemaManager.py +0 -45
- GridCal-5.1.4/GridCal/Gui/Main/icons_rc.py +0 -28802
- {GridCal-5.1.4 → GridCal-5.1.5}/GridCal/ExecuteGridCal.py +0 -0
- {GridCal-5.1.4 → GridCal-5.1.5}/GridCal/Gui/AboutDialogue/__init__.py +0 -0
- {GridCal-5.1.4 → GridCal-5.1.5}/GridCal/Gui/AboutDialogue/about_dialogue.py +0 -0
- {GridCal-5.1.4 → GridCal-5.1.5}/GridCal/Gui/AboutDialogue/gui.py +0 -0
- {GridCal-5.1.4 → GridCal-5.1.5}/GridCal/Gui/AboutDialogue/icons_rc.py +0 -0
- {GridCal-5.1.4 → GridCal-5.1.5}/GridCal/Gui/AboutDialogue/update_gui_file.py +0 -0
- {GridCal-5.1.4 → GridCal-5.1.5}/GridCal/Gui/Analysis/AnalysisDialogue.py +0 -0
- {GridCal-5.1.4 → GridCal-5.1.5}/GridCal/Gui/Analysis/__init__.py +0 -0
- {GridCal-5.1.4 → GridCal-5.1.5}/GridCal/Gui/Analysis/gui.py +0 -0
- {GridCal-5.1.4 → GridCal-5.1.5}/GridCal/Gui/Analysis/icons_rc.py +0 -0
- {GridCal-5.1.4 → GridCal-5.1.5}/GridCal/Gui/Analysis/object_plot_analysis.py +0 -0
- {GridCal-5.1.4 → GridCal-5.1.5}/GridCal/Gui/Analysis/update_gui_file.py +0 -0
- {GridCal-5.1.4 → GridCal-5.1.5}/GridCal/Gui/CascadingSteps/__init__.py +0 -0
- {GridCal-5.1.4 → GridCal-5.1.5}/GridCal/Gui/CascadingSteps/cascading_steps.py +0 -0
- {GridCal-5.1.4 → GridCal-5.1.5}/GridCal/Gui/CascadingSteps/gui.py +0 -0
- {GridCal-5.1.4 → GridCal-5.1.5}/GridCal/Gui/CascadingSteps/update_gui_file.py +0 -0
- {GridCal-5.1.4 → GridCal-5.1.5}/GridCal/Gui/ConsoleWidget.py +0 -0
- {GridCal-5.1.4 → GridCal-5.1.5}/GridCal/Gui/ContingencyPlanner/__init__.py +0 -0
- {GridCal-5.1.4 → GridCal-5.1.5}/GridCal/Gui/ContingencyPlanner/contingency_planner_dialogue.py +0 -0
- {GridCal-5.1.4 → GridCal-5.1.5}/GridCal/Gui/ContingencyPlanner/gui.py +0 -0
- {GridCal-5.1.4 → GridCal-5.1.5}/GridCal/Gui/ContingencyPlanner/icons_rc.py +0 -0
- {GridCal-5.1.4 → GridCal-5.1.5}/GridCal/Gui/ContingencyPlanner/update_gui_file.py +0 -0
- {GridCal-5.1.4 → GridCal-5.1.5}/GridCal/Gui/CoordinatesInput/__init__.py +0 -0
- {GridCal-5.1.4 → GridCal-5.1.5}/GridCal/Gui/CoordinatesInput/coordinates_dialogue.py +0 -0
- {GridCal-5.1.4 → GridCal-5.1.5}/GridCal/Gui/CoordinatesInput/gui.py +0 -0
- {GridCal-5.1.4 → GridCal-5.1.5}/GridCal/Gui/CoordinatesInput/icons_rc.py +0 -0
- {GridCal-5.1.4 → GridCal-5.1.5}/GridCal/Gui/CoordinatesInput/update_gui_file.py +0 -0
- {GridCal-5.1.4 → GridCal-5.1.5}/GridCal/Gui/Diagrams/DiagramEditorWidget/Branches/__init__.py +0 -0
- {GridCal-5.1.4 → GridCal-5.1.5}/GridCal/Gui/Diagrams/DiagramEditorWidget/Branches/dc_line_graphics.py +0 -0
- {GridCal-5.1.4 → GridCal-5.1.5}/GridCal/Gui/Diagrams/DiagramEditorWidget/Branches/hvdc_graphics.py +0 -0
- {GridCal-5.1.4 → GridCal-5.1.5}/GridCal/Gui/Diagrams/DiagramEditorWidget/Branches/line_editor.py +0 -0
- {GridCal-5.1.4 → GridCal-5.1.5}/GridCal/Gui/Diagrams/DiagramEditorWidget/Branches/line_graphics.py +0 -0
- {GridCal-5.1.4 → GridCal-5.1.5}/GridCal/Gui/Diagrams/DiagramEditorWidget/Branches/line_graphics_template.py +0 -0
- {GridCal-5.1.4 → GridCal-5.1.5}/GridCal/Gui/Diagrams/DiagramEditorWidget/Branches/series_reactance_graphics.py +0 -0
- {GridCal-5.1.4 → GridCal-5.1.5}/GridCal/Gui/Diagrams/DiagramEditorWidget/Branches/switch_graphics.py +0 -0
- {GridCal-5.1.4 → GridCal-5.1.5}/GridCal/Gui/Diagrams/DiagramEditorWidget/Branches/transformer2w_graphics.py +0 -0
- {GridCal-5.1.4 → GridCal-5.1.5}/GridCal/Gui/Diagrams/DiagramEditorWidget/Branches/transformer3w_graphics.py +0 -0
- {GridCal-5.1.4 → GridCal-5.1.5}/GridCal/Gui/Diagrams/DiagramEditorWidget/Branches/transformer_editor.py +0 -0
- {GridCal-5.1.4 → GridCal-5.1.5}/GridCal/Gui/Diagrams/DiagramEditorWidget/Branches/upfc_graphics.py +0 -0
- {GridCal-5.1.4 → GridCal-5.1.5}/GridCal/Gui/Diagrams/DiagramEditorWidget/Branches/vsc_graphics.py +0 -0
- {GridCal-5.1.4 → GridCal-5.1.5}/GridCal/Gui/Diagrams/DiagramEditorWidget/Branches/winding_graphics.py +0 -0
- {GridCal-5.1.4 → GridCal-5.1.5}/GridCal/Gui/Diagrams/DiagramEditorWidget/Fluid/__init__.py +0 -0
- {GridCal-5.1.4 → GridCal-5.1.5}/GridCal/Gui/Diagrams/DiagramEditorWidget/Fluid/fluid_node_graphics.py +0 -0
- {GridCal-5.1.4 → GridCal-5.1.5}/GridCal/Gui/Diagrams/DiagramEditorWidget/Fluid/fluid_p2x_graphics.py +0 -0
- {GridCal-5.1.4 → GridCal-5.1.5}/GridCal/Gui/Diagrams/DiagramEditorWidget/Fluid/fluid_path_graphics.py +0 -0
- {GridCal-5.1.4 → GridCal-5.1.5}/GridCal/Gui/Diagrams/DiagramEditorWidget/Fluid/fluid_pump_graphics.py +0 -0
- {GridCal-5.1.4 → GridCal-5.1.5}/GridCal/Gui/Diagrams/DiagramEditorWidget/Fluid/fluid_turbine_graphics.py +0 -0
- {GridCal-5.1.4 → GridCal-5.1.5}/GridCal/Gui/Diagrams/DiagramEditorWidget/Injections/__init__.py +0 -0
- {GridCal-5.1.4 → GridCal-5.1.5}/GridCal/Gui/Diagrams/DiagramEditorWidget/Injections/battery_graphics.py +0 -0
- {GridCal-5.1.4 → GridCal-5.1.5}/GridCal/Gui/Diagrams/DiagramEditorWidget/Injections/controllable_shunt_graphics.py +0 -0
- {GridCal-5.1.4 → GridCal-5.1.5}/GridCal/Gui/Diagrams/DiagramEditorWidget/Injections/current_injection_graphics.py +0 -0
- {GridCal-5.1.4 → GridCal-5.1.5}/GridCal/Gui/Diagrams/DiagramEditorWidget/Injections/external_grid_graphics.py +0 -0
- {GridCal-5.1.4 → GridCal-5.1.5}/GridCal/Gui/Diagrams/DiagramEditorWidget/Injections/generator_graphics.py +0 -0
- {GridCal-5.1.4 → GridCal-5.1.5}/GridCal/Gui/Diagrams/DiagramEditorWidget/Injections/injections_template_graphics.py +0 -0
- {GridCal-5.1.4 → GridCal-5.1.5}/GridCal/Gui/Diagrams/DiagramEditorWidget/Injections/load_graphics.py +0 -0
- {GridCal-5.1.4 → GridCal-5.1.5}/GridCal/Gui/Diagrams/DiagramEditorWidget/Injections/shunt_graphics.py +0 -0
- {GridCal-5.1.4 → GridCal-5.1.5}/GridCal/Gui/Diagrams/DiagramEditorWidget/Injections/static_generator_graphics.py +0 -0
- {GridCal-5.1.4 → GridCal-5.1.5}/GridCal/Gui/Diagrams/DiagramEditorWidget/Substation/__init__.py +0 -0
- {GridCal-5.1.4 → GridCal-5.1.5}/GridCal/Gui/Diagrams/DiagramEditorWidget/Substation/bus_graphics.py +0 -0
- {GridCal-5.1.4 → GridCal-5.1.5}/GridCal/Gui/Diagrams/DiagramEditorWidget/Substation/busbar_graphics.py +0 -0
- {GridCal-5.1.4 → GridCal-5.1.5}/GridCal/Gui/Diagrams/DiagramEditorWidget/Substation/cn_graphics.py +0 -0
- {GridCal-5.1.4 → GridCal-5.1.5}/GridCal/Gui/Diagrams/DiagramEditorWidget/__init__.py +0 -0
- {GridCal-5.1.4 → GridCal-5.1.5}/GridCal/Gui/Diagrams/DiagramEditorWidget/generic_graphics.py +0 -0
- {GridCal-5.1.4 → GridCal-5.1.5}/GridCal/Gui/Diagrams/DiagramEditorWidget/matplotlibwidget.py +0 -0
- {GridCal-5.1.4 → GridCal-5.1.5}/GridCal/Gui/Diagrams/DiagramEditorWidget/terminal_item.py +0 -0
- {GridCal-5.1.4 → GridCal-5.1.5}/GridCal/Gui/Diagrams/MapWidget/Layers/__init__.py +0 -0
- {GridCal-5.1.4 → GridCal-5.1.5}/GridCal/Gui/Diagrams/MapWidget/Layers/image_layer.py +0 -0
- {GridCal-5.1.4 → GridCal-5.1.5}/GridCal/Gui/Diagrams/MapWidget/Layers/layer_types.py +0 -0
- {GridCal-5.1.4 → GridCal-5.1.5}/GridCal/Gui/Diagrams/MapWidget/Layers/place.py +0 -0
- {GridCal-5.1.4 → GridCal-5.1.5}/GridCal/Gui/Diagrams/MapWidget/Layers/point_layer.py +0 -0
- {GridCal-5.1.4 → GridCal-5.1.5}/GridCal/Gui/Diagrams/MapWidget/Layers/polygon_layer.py +0 -0
- {GridCal-5.1.4 → GridCal-5.1.5}/GridCal/Gui/Diagrams/MapWidget/Layers/polyline_layer.py +0 -0
- {GridCal-5.1.4 → GridCal-5.1.5}/GridCal/Gui/Diagrams/MapWidget/Layers/text_layer.py +0 -0
- {GridCal-5.1.4 → GridCal-5.1.5}/GridCal/Gui/Diagrams/MapWidget/Schema/Connector.py +0 -0
- {GridCal-5.1.4 → GridCal-5.1.5}/GridCal/Gui/Diagrams/MapWidget/Schema/__init__.py +0 -0
- {GridCal-5.1.4 → GridCal-5.1.5}/GridCal/Gui/Diagrams/MapWidget/TileProviders/__init__.py +0 -0
- {GridCal-5.1.4 → GridCal-5.1.5}/GridCal/Gui/Diagrams/MapWidget/TileProviders/blue_marble.py +0 -0
- {GridCal-5.1.4 → GridCal-5.1.5}/GridCal/Gui/Diagrams/MapWidget/TileProviders/cartodb.py +0 -0
- {GridCal-5.1.4 → GridCal-5.1.5}/GridCal/Gui/Diagrams/MapWidget/TileProviders/gmt_local.py +0 -0
- {GridCal-5.1.4 → GridCal-5.1.5}/GridCal/Gui/Diagrams/MapWidget/TileProviders/mapbox.py +0 -0
- {GridCal-5.1.4 → GridCal-5.1.5}/GridCal/Gui/Diagrams/MapWidget/TileProviders/mapquest.py +0 -0
- {GridCal-5.1.4 → GridCal-5.1.5}/GridCal/Gui/Diagrams/MapWidget/TileProviders/open_street_map.py +0 -0
- {GridCal-5.1.4 → GridCal-5.1.5}/GridCal/Gui/Diagrams/MapWidget/TileProviders/stamen_toner.py +0 -0
- {GridCal-5.1.4 → GridCal-5.1.5}/GridCal/Gui/Diagrams/MapWidget/TileProviders/stamen_transport.py +0 -0
- {GridCal-5.1.4 → GridCal-5.1.5}/GridCal/Gui/Diagrams/MapWidget/TileProviders/stamen_watercolor.py +0 -0
- {GridCal-5.1.4 → GridCal-5.1.5}/GridCal/Gui/Diagrams/MapWidget/Tiles/__init__.py +0 -0
- {GridCal-5.1.4 → GridCal-5.1.5}/GridCal/Gui/Diagrams/MapWidget/Tiles/base_tiles.py +0 -0
- {GridCal-5.1.4 → GridCal-5.1.5}/GridCal/Gui/Diagrams/MapWidget/Tiles/default_tile_data.py +0 -0
- {GridCal-5.1.4 → GridCal-5.1.5}/GridCal/Gui/Diagrams/MapWidget/Tiles/pycacheback.py +0 -0
- {GridCal-5.1.4 → GridCal-5.1.5}/GridCal/Gui/Diagrams/MapWidget/Tiles/tile_worker.py +0 -0
- {GridCal-5.1.4 → GridCal-5.1.5}/GridCal/Gui/Diagrams/MapWidget/Tiles/tiles.py +0 -0
- {GridCal-5.1.4 → GridCal-5.1.5}/GridCal/Gui/Diagrams/MapWidget/Tiles/tiles_cache.py +0 -0
- {GridCal-5.1.4 → GridCal-5.1.5}/GridCal/Gui/Diagrams/MapWidget/__init__.py +0 -0
- {GridCal-5.1.4 → GridCal-5.1.5}/GridCal/Gui/Diagrams/MapWidget/logger.py +0 -0
- {GridCal-5.1.4 → GridCal-5.1.5}/GridCal/Gui/Diagrams/MapWidget/map_events.py +0 -0
- {GridCal-5.1.4 → GridCal-5.1.5}/GridCal/Gui/Diagrams/MapWidget/node_widget.py +0 -0
- {GridCal-5.1.4 → GridCal-5.1.5}/GridCal/Gui/Diagrams/__init__.py +0 -0
- {GridCal-5.1.4 → GridCal-5.1.5}/GridCal/Gui/Diagrams/diagrams_model.py +0 -0
- {GridCal-5.1.4 → GridCal-5.1.5}/GridCal/Gui/Diagrams/graphics_manager.py +0 -0
- {GridCal-5.1.4 → GridCal-5.1.5}/GridCal/Gui/GeneralDialogues.py +0 -0
- {GridCal-5.1.4 → GridCal-5.1.5}/GridCal/Gui/GridGenerator/__init__.py +0 -0
- {GridCal-5.1.4 → GridCal-5.1.5}/GridCal/Gui/GridGenerator/grid_generator_dialogue.py +0 -0
- {GridCal-5.1.4 → GridCal-5.1.5}/GridCal/Gui/GridGenerator/gui.py +0 -0
- {GridCal-5.1.4 → GridCal-5.1.5}/GridCal/Gui/GridGenerator/icons_rc.py +0 -0
- {GridCal-5.1.4 → GridCal-5.1.5}/GridCal/Gui/GridGenerator/update_gui_file.py +0 -0
- {GridCal-5.1.4 → GridCal-5.1.5}/GridCal/Gui/GuiFunctions.py +0 -0
- {GridCal-5.1.4 → GridCal-5.1.5}/GridCal/Gui/LoadDesigner/__init__.py +0 -0
- {GridCal-5.1.4 → GridCal-5.1.5}/GridCal/Gui/LoadDesigner/icons_rc.py +0 -0
- {GridCal-5.1.4 → GridCal-5.1.5}/GridCal/Gui/LoadDesigner/load_designer.py +0 -0
- {GridCal-5.1.4 → GridCal-5.1.5}/GridCal/Gui/LoadDesigner/load_designer_ui.py +0 -0
- {GridCal-5.1.4 → GridCal-5.1.5}/GridCal/Gui/LoadDesigner/update_gui_file.py +0 -0
- {GridCal-5.1.4 → GridCal-5.1.5}/GridCal/Gui/Main/ConsoleLogController.py +0 -0
- {GridCal-5.1.4 → GridCal-5.1.5}/GridCal/Gui/Main/GridCalMain.py +0 -0
- {GridCal-5.1.4 → GridCal-5.1.5}/GridCal/Gui/Main/SubClasses/Model/__init__.py +0 -0
- {GridCal-5.1.4 → GridCal-5.1.5}/GridCal/Gui/Main/SubClasses/Model/compiled_arrays.py +0 -0
- {GridCal-5.1.4 → GridCal-5.1.5}/GridCal/Gui/Main/SubClasses/Model/diagrams.py +0 -0
- {GridCal-5.1.4 → GridCal-5.1.5}/GridCal/Gui/Main/SubClasses/README.txt +0 -0
- {GridCal-5.1.4 → GridCal-5.1.5}/GridCal/Gui/Main/SubClasses/Results/__init__.py +0 -0
- {GridCal-5.1.4 → GridCal-5.1.5}/GridCal/Gui/Main/SubClasses/Results/results.py +0 -0
- {GridCal-5.1.4 → GridCal-5.1.5}/GridCal/Gui/Main/SubClasses/Scripting/__init__.py +0 -0
- {GridCal-5.1.4 → GridCal-5.1.5}/GridCal/Gui/Main/SubClasses/Scripting/python_highlighter.py +0 -0
- {GridCal-5.1.4 → GridCal-5.1.5}/GridCal/Gui/Main/SubClasses/Scripting/scripting.py +0 -0
- {GridCal-5.1.4 → GridCal-5.1.5}/GridCal/Gui/Main/SubClasses/Settings/__init__.py +0 -0
- {GridCal-5.1.4 → GridCal-5.1.5}/GridCal/Gui/Main/SubClasses/__init__.py +0 -0
- {GridCal-5.1.4 → GridCal-5.1.5}/GridCal/Gui/Main/SubClasses/base_gui.py +0 -0
- {GridCal-5.1.4 → GridCal-5.1.5}/GridCal/Gui/Main/SubClasses/simulations.py +0 -0
- {GridCal-5.1.4 → GridCal-5.1.5}/GridCal/Gui/Main/__init__.py +0 -0
- {GridCal-5.1.4 → GridCal-5.1.5}/GridCal/Gui/Main/object_select_window.py +0 -0
- {GridCal-5.1.4 → GridCal-5.1.5}/GridCal/Gui/Main/update_gui_file.py +0 -0
- {GridCal-5.1.4 → GridCal-5.1.5}/GridCal/Gui/ProfilesInput/__init__.py +0 -0
- {GridCal-5.1.4 → GridCal-5.1.5}/GridCal/Gui/ProfilesInput/excel_dialog.py +0 -0
- {GridCal-5.1.4 → GridCal-5.1.5}/GridCal/Gui/ProfilesInput/excel_sheet_selection.py +0 -0
- {GridCal-5.1.4 → GridCal-5.1.5}/GridCal/Gui/ProfilesInput/icons_rc.py +0 -0
- {GridCal-5.1.4 → GridCal-5.1.5}/GridCal/Gui/ProfilesInput/models_dialogue.py +0 -0
- {GridCal-5.1.4 → GridCal-5.1.5}/GridCal/Gui/ProfilesInput/profile_dialogue.py +0 -0
- {GridCal-5.1.4 → GridCal-5.1.5}/GridCal/Gui/ProfilesInput/profiles_from_data.py +0 -0
- {GridCal-5.1.4 → GridCal-5.1.5}/GridCal/Gui/ProfilesInput/profiles_from_data_gui.py +0 -0
- {GridCal-5.1.4 → GridCal-5.1.5}/GridCal/Gui/ProfilesInput/profiles_from_models_gui.py +0 -0
- {GridCal-5.1.4 → GridCal-5.1.5}/GridCal/Gui/ProfilesInput/update_gui_file.py +0 -0
- {GridCal-5.1.4 → GridCal-5.1.5}/GridCal/Gui/RosetaExplorer/ConsoleWidget.py +0 -0
- {GridCal-5.1.4 → GridCal-5.1.5}/GridCal/Gui/RosetaExplorer/MainWindow.py +0 -0
- {GridCal-5.1.4 → GridCal-5.1.5}/GridCal/Gui/RosetaExplorer/RosetaExplorer.py +0 -0
- {GridCal-5.1.4 → GridCal-5.1.5}/GridCal/Gui/RosetaExplorer/__init__.py +0 -0
- {GridCal-5.1.4 → GridCal-5.1.5}/GridCal/Gui/RosetaExplorer/icons_rc.py +0 -0
- {GridCal-5.1.4 → GridCal-5.1.5}/GridCal/Gui/RosetaExplorer/update_gui_file.py +0 -0
- {GridCal-5.1.4 → GridCal-5.1.5}/GridCal/Gui/SigmaAnalysis/__init__.py +0 -0
- {GridCal-5.1.4 → GridCal-5.1.5}/GridCal/Gui/SigmaAnalysis/gui.py +0 -0
- {GridCal-5.1.4 → GridCal-5.1.5}/GridCal/Gui/SigmaAnalysis/icons_rc.py +0 -0
- {GridCal-5.1.4 → GridCal-5.1.5}/GridCal/Gui/SigmaAnalysis/sigma_analysis_dialogue.py +0 -0
- {GridCal-5.1.4 → GridCal-5.1.5}/GridCal/Gui/SigmaAnalysis/update_gui_file.py +0 -0
- {GridCal-5.1.4 → GridCal-5.1.5}/GridCal/Gui/SolarPowerWizard/__init__.py +0 -0
- {GridCal-5.1.4 → GridCal-5.1.5}/GridCal/Gui/SolarPowerWizard/gui.py +0 -0
- {GridCal-5.1.4 → GridCal-5.1.5}/GridCal/Gui/SolarPowerWizard/icons_rc.py +0 -0
- {GridCal-5.1.4 → GridCal-5.1.5}/GridCal/Gui/SolarPowerWizard/solar_power_wizzard.py +0 -0
- {GridCal-5.1.4 → GridCal-5.1.5}/GridCal/Gui/SolarPowerWizard/update_gui_file.py +0 -0
- {GridCal-5.1.4 → GridCal-5.1.5}/GridCal/Gui/SyncDialogue/__init__.py +0 -0
- {GridCal-5.1.4 → GridCal-5.1.5}/GridCal/Gui/SyncDialogue/gui.py +0 -0
- {GridCal-5.1.4 → GridCal-5.1.5}/GridCal/Gui/SyncDialogue/icons_rc.py +0 -0
- {GridCal-5.1.4 → GridCal-5.1.5}/GridCal/Gui/SyncDialogue/sync_dialogue.py +0 -0
- {GridCal-5.1.4 → GridCal-5.1.5}/GridCal/Gui/SyncDialogue/update_gui_file.py +0 -0
- {GridCal-5.1.4 → GridCal-5.1.5}/GridCal/Gui/SystemScaler/__init__.py +0 -0
- {GridCal-5.1.4 → GridCal-5.1.5}/GridCal/Gui/SystemScaler/icons_rc.py +0 -0
- {GridCal-5.1.4 → GridCal-5.1.5}/GridCal/Gui/SystemScaler/system_scaler.py +0 -0
- {GridCal-5.1.4 → GridCal-5.1.5}/GridCal/Gui/SystemScaler/system_scaler_ui.py +0 -0
- {GridCal-5.1.4 → GridCal-5.1.5}/GridCal/Gui/SystemScaler/update_gui_file.py +0 -0
- {GridCal-5.1.4 → GridCal-5.1.5}/GridCal/Gui/TowerBuilder/LineBuilderDialogue.py +0 -0
- {GridCal-5.1.4 → GridCal-5.1.5}/GridCal/Gui/TowerBuilder/__init__.py +0 -0
- {GridCal-5.1.4 → GridCal-5.1.5}/GridCal/Gui/TowerBuilder/gui.py +0 -0
- {GridCal-5.1.4 → GridCal-5.1.5}/GridCal/Gui/TowerBuilder/icons_rc.py +0 -0
- {GridCal-5.1.4 → GridCal-5.1.5}/GridCal/Gui/TowerBuilder/table_models.py +0 -0
- {GridCal-5.1.4 → GridCal-5.1.5}/GridCal/Gui/TowerBuilder/test_.py +0 -0
- {GridCal-5.1.4 → GridCal-5.1.5}/GridCal/Gui/TowerBuilder/update_gui_file.py +0 -0
- {GridCal-5.1.4 → GridCal-5.1.5}/GridCal/Gui/TreeModelViewer/MainWindow.py +0 -0
- {GridCal-5.1.4 → GridCal-5.1.5}/GridCal/Gui/TreeModelViewer/TreeModelViewer.py +0 -0
- {GridCal-5.1.4 → GridCal-5.1.5}/GridCal/Gui/TreeModelViewer/__init__.py +0 -0
- {GridCal-5.1.4 → GridCal-5.1.5}/GridCal/Gui/TreeModelViewer/icons_rc.py +0 -0
- {GridCal-5.1.4 → GridCal-5.1.5}/GridCal/Gui/TreeModelViewer/update_gui_file.py +0 -0
- {GridCal-5.1.4 → GridCal-5.1.5}/GridCal/Gui/Visualization/__init__.py +0 -0
- {GridCal-5.1.4 → GridCal-5.1.5}/GridCal/Gui/Visualization/palettes.py +0 -0
- {GridCal-5.1.4 → GridCal-5.1.5}/GridCal/Gui/Visualization/visualization.py +0 -0
- {GridCal-5.1.4 → GridCal-5.1.5}/GridCal/Gui/Widgets/__init__.py +0 -0
- {GridCal-5.1.4 → GridCal-5.1.5}/GridCal/Gui/Widgets/custom_qrangeslider.py +0 -0
- {GridCal-5.1.4 → GridCal-5.1.5}/GridCal/Gui/Widgets/matplotlibwidget.py +0 -0
- {GridCal-5.1.4 → GridCal-5.1.5}/GridCal/Gui/WindPowerWizard/__init__.py +0 -0
- {GridCal-5.1.4 → GridCal-5.1.5}/GridCal/Gui/WindPowerWizard/gui.py +0 -0
- {GridCal-5.1.4 → GridCal-5.1.5}/GridCal/Gui/WindPowerWizard/icons_rc.py +0 -0
- {GridCal-5.1.4 → GridCal-5.1.5}/GridCal/Gui/WindPowerWizard/update_gui_file.py +0 -0
- {GridCal-5.1.4 → GridCal-5.1.5}/GridCal/Gui/WindPowerWizard/wind_power_wizzard.py +0 -0
- {GridCal-5.1.4 → GridCal-5.1.5}/GridCal/Gui/__init__.py +0 -0
- {GridCal-5.1.4 → GridCal-5.1.5}/GridCal/Gui/messages.py +0 -0
- {GridCal-5.1.4 → GridCal-5.1.5}/GridCal/Gui/plot_config.py +0 -0
- {GridCal-5.1.4 → GridCal-5.1.5}/GridCal/Gui/themes.py +0 -0
- {GridCal-5.1.4 → GridCal-5.1.5}/GridCal/Gui/update_gui_all.py +0 -0
- {GridCal-5.1.4 → GridCal-5.1.5}/GridCal/Gui/update_gui_common.py +0 -0
- {GridCal-5.1.4 → GridCal-5.1.5}/GridCal/LICENSE.txt +0 -0
- {GridCal-5.1.4 → GridCal-5.1.5}/GridCal/Session/__init__.py +0 -0
- {GridCal-5.1.4 → GridCal-5.1.5}/GridCal/Session/export_results_driver.py +0 -0
- {GridCal-5.1.4 → GridCal-5.1.5}/GridCal/Session/file_handler.py +0 -0
- {GridCal-5.1.4 → GridCal-5.1.5}/GridCal/Session/results_model.py +0 -0
- {GridCal-5.1.4 → GridCal-5.1.5}/GridCal/Session/session.py +0 -0
- {GridCal-5.1.4 → GridCal-5.1.5}/GridCal/Session/synchronization_driver.py +0 -0
- {GridCal-5.1.4 → GridCal-5.1.5}/GridCal/__init__.py +0 -0
- {GridCal-5.1.4 → GridCal-5.1.5}/GridCal/data/__init__.py +0 -0
- {GridCal-5.1.4 → GridCal-5.1.5}/GridCal/data/cables.csv +0 -0
- {GridCal-5.1.4 → GridCal-5.1.5}/GridCal/data/sequence_lines.csv +0 -0
- {GridCal-5.1.4 → GridCal-5.1.5}/GridCal/data/transformers.csv +0 -0
- {GridCal-5.1.4 → GridCal-5.1.5}/GridCal/data/wires.csv +0 -0
- {GridCal-5.1.4 → GridCal-5.1.5}/GridCal/templates.py +0 -0
- {GridCal-5.1.4 → GridCal-5.1.5}/GridCal/update.py +0 -0
- {GridCal-5.1.4 → GridCal-5.1.5}/setup.cfg +0 -0
{GridCal-5.1.4 → GridCal-5.1.5}/GridCal/Gui/Diagrams/DiagramEditorWidget/diagram_editor_widget.py
RENAMED
@@ -37,6 +37,8 @@ from PySide6.QtSvg import QSvgGenerator
|
|
37
37
|
from GridCalEngine.Devices.types import ALL_DEV_TYPES, INJECTION_DEVICE_TYPES, FLUID_TYPES
|
38
38
|
from GridCalEngine.Devices.multi_circuit import MultiCircuit
|
39
39
|
from GridCalEngine.Devices.Substation.bus import Bus
|
40
|
+
from GridCalEngine.Devices.Substation.substation import Substation
|
41
|
+
from GridCalEngine.Devices.Substation.voltage_level import VoltageLevel
|
40
42
|
from GridCalEngine.Devices.Substation.busbar import BusBar
|
41
43
|
from GridCalEngine.Devices.Substation.connectivity_node import ConnectivityNode
|
42
44
|
from GridCalEngine.Devices.Branches.line import Line
|
@@ -3614,6 +3616,140 @@ class DiagramEditorWidget(QSplitter):
|
|
3614
3616
|
else:
|
3615
3617
|
api_object.active_prof.fill(False)
|
3616
3618
|
|
3619
|
+
def split_line_now(self, line_graphics: LineGraphicItem, position: float, extra_km: float):
|
3620
|
+
"""
|
3621
|
+
|
3622
|
+
:param line_graphics:
|
3623
|
+
:param position:
|
3624
|
+
:param extra_km:
|
3625
|
+
:return:
|
3626
|
+
"""
|
3627
|
+
|
3628
|
+
if 0.0 < position < 1.0:
|
3629
|
+
|
3630
|
+
# Each of the Branches will have the proportional impedance
|
3631
|
+
# Bus_from Middle_bus Bus_To
|
3632
|
+
# o----------------------o--------------------o
|
3633
|
+
# >-------- x -------->|
|
3634
|
+
# (x: distance measured in per unit (0~1)
|
3635
|
+
line = line_graphics.api_object
|
3636
|
+
name = line.name + ' split'
|
3637
|
+
mid_sub = Substation(name=name,
|
3638
|
+
area=line.bus_from.area,
|
3639
|
+
zone=line.bus_from.zone,
|
3640
|
+
country=line.bus_from.country)
|
3641
|
+
mid_vl = VoltageLevel(name=name, substation=mid_sub)
|
3642
|
+
mid_bus = Bus(name=name,
|
3643
|
+
vnom=line.bus_from.Vnom,
|
3644
|
+
vmin=line.bus_from.Vmin,
|
3645
|
+
vmax=line.bus_from.Vmax,
|
3646
|
+
voltage_level=mid_vl,
|
3647
|
+
substation=mid_sub,
|
3648
|
+
area=line.bus_from.area,
|
3649
|
+
zone=line.bus_from.zone,
|
3650
|
+
country=line.bus_from.country)
|
3651
|
+
|
3652
|
+
bus_f_graphics_data = self.diagram.query_point(line.bus_from)
|
3653
|
+
bus_t_graphics_data = self.diagram.query_point(line.bus_to)
|
3654
|
+
bus_f_graphic_obj = self.graphics_manager.query(line.bus_from)
|
3655
|
+
bus_t_graphic_obj = self.graphics_manager.query(line.bus_to)
|
3656
|
+
|
3657
|
+
if bus_f_graphics_data is None:
|
3658
|
+
error_msg(f"{line.bus_from} was not found in the diagram")
|
3659
|
+
return None
|
3660
|
+
if bus_t_graphics_data is None:
|
3661
|
+
error_msg(f"{line.bus_to} was not found in the diagram")
|
3662
|
+
return None
|
3663
|
+
if bus_f_graphic_obj is None:
|
3664
|
+
error_msg(f"{line.bus_from} was not found in the graphics manager")
|
3665
|
+
return None
|
3666
|
+
if bus_t_graphic_obj is None:
|
3667
|
+
error_msg(f"{line.bus_to} was not found in the graphics manager")
|
3668
|
+
return None
|
3669
|
+
|
3670
|
+
# C(x, y) = (x1 + t * (x2 - x1), y1 + t * (y2 - y1))
|
3671
|
+
middle_bus_x = int(bus_f_graphics_data.x + (bus_t_graphics_data.x - bus_f_graphics_data.x) * position)
|
3672
|
+
middle_bus_y = int(bus_f_graphics_data.y + (bus_t_graphics_data.y - bus_f_graphics_data.y) * position)
|
3673
|
+
|
3674
|
+
position_a = position + (extra_km / line.length) if line.length > 0.0 else position
|
3675
|
+
|
3676
|
+
# create first split
|
3677
|
+
br1 = Line(name=line.name + ' split 1',
|
3678
|
+
bus_from=line.bus_from,
|
3679
|
+
bus_to=mid_bus,
|
3680
|
+
r=line.R * position_a,
|
3681
|
+
x=line.X * position_a,
|
3682
|
+
b=line.B * position_a,
|
3683
|
+
r0=line.R0 * position_a,
|
3684
|
+
x0=line.X0 * position_a,
|
3685
|
+
b0=line.B0 * position_a,
|
3686
|
+
r2=line.R2 * position_a,
|
3687
|
+
x2=line.X2 * position_a,
|
3688
|
+
b2=line.B2 * position_a,
|
3689
|
+
length=line.length * position_a,
|
3690
|
+
rate=line.rate,
|
3691
|
+
contingency_factor=line.contingency_factor,
|
3692
|
+
protection_rating_factor=line.protection_rating_factor)
|
3693
|
+
|
3694
|
+
position_c = (1.0 - position) + (extra_km / line.length) if line.length > 0.0 else (1.0 - position)
|
3695
|
+
br2 = Line(name=line.name + ' split 2',
|
3696
|
+
bus_from=mid_bus,
|
3697
|
+
bus_to=line.bus_to,
|
3698
|
+
r=line.R * position_c,
|
3699
|
+
x=line.X * position_c,
|
3700
|
+
b=line.B * position_c,
|
3701
|
+
r0=line.R0 * position_c,
|
3702
|
+
x0=line.X0 * position_c,
|
3703
|
+
b0=line.B0 * position_c,
|
3704
|
+
r2=line.R2 * position_c,
|
3705
|
+
x2=line.X2 * position_c,
|
3706
|
+
b2=line.B2 * position_c,
|
3707
|
+
length=line.length * position_c,
|
3708
|
+
rate=line.rate,
|
3709
|
+
contingency_factor=line.contingency_factor,
|
3710
|
+
protection_rating_factor=line.protection_rating_factor)
|
3711
|
+
|
3712
|
+
# deactivate the original line
|
3713
|
+
line_graphics.api_object.active = False
|
3714
|
+
line_graphics.api_object.active_prof.fill(False)
|
3715
|
+
line_graphics.set_enable(False)
|
3716
|
+
|
3717
|
+
# add to gridcal the new 2 lines and the bus
|
3718
|
+
self.circuit.add_bus(mid_bus)
|
3719
|
+
self.circuit.add_line(br1)
|
3720
|
+
self.circuit.add_line(br2)
|
3721
|
+
|
3722
|
+
# add new stuff as new investment
|
3723
|
+
inv_group = InvestmentsGroup(name=line.name + ' split', category='Line split')
|
3724
|
+
self.circuit.add_investments_group(inv_group)
|
3725
|
+
self.circuit.add_investment(
|
3726
|
+
Investment(name=mid_bus.name, device_idtag=mid_bus.idtag, group=inv_group))
|
3727
|
+
self.circuit.add_investment(Investment(name=br1.name, device_idtag=br1.idtag, group=inv_group))
|
3728
|
+
self.circuit.add_investment(Investment(name=br2.name, device_idtag=br2.idtag, group=inv_group))
|
3729
|
+
|
3730
|
+
# add to the schematic the new 2 lines and the bus
|
3731
|
+
middle_bus_graphics = self.add_api_bus(bus=mid_bus,
|
3732
|
+
injections_by_tpe=dict(),
|
3733
|
+
x0=middle_bus_x,
|
3734
|
+
y0=middle_bus_y)
|
3735
|
+
br1_graphics = self.add_api_line(branch=br1,
|
3736
|
+
bus_f_graphic0=bus_f_graphic_obj,
|
3737
|
+
bus_t_graphic0=middle_bus_graphics)
|
3738
|
+
br2_graphics = self.add_api_line(branch=br2,
|
3739
|
+
bus_f_graphic0=middle_bus_graphics,
|
3740
|
+
bus_t_graphic0=bus_t_graphic_obj)
|
3741
|
+
|
3742
|
+
self.add_to_scene(middle_bus_graphics)
|
3743
|
+
self.add_to_scene(br1_graphics)
|
3744
|
+
self.add_to_scene(br2_graphics)
|
3745
|
+
|
3746
|
+
# redraw
|
3747
|
+
bus_f_graphic_obj.arrange_children()
|
3748
|
+
bus_t_graphic_obj.arrange_children()
|
3749
|
+
middle_bus_graphics.arrange_children()
|
3750
|
+
else:
|
3751
|
+
error_msg("Incorrect position", 'Line split')
|
3752
|
+
|
3617
3753
|
def split_line(self, line_graphics: LineGraphicItem):
|
3618
3754
|
"""
|
3619
3755
|
Split line
|
@@ -3631,131 +3767,22 @@ class DiagramEditorWidget(QSplitter):
|
|
3631
3767
|
if dlg.exec_():
|
3632
3768
|
|
3633
3769
|
if dlg.is_accepted:
|
3634
|
-
|
3635
3770
|
position = dlg.value / 100.0
|
3636
3771
|
|
3637
|
-
|
3638
|
-
|
3639
|
-
|
3640
|
-
# Bus_from Middle_bus Bus_To
|
3641
|
-
# o----------------------o--------------------o
|
3642
|
-
# >-------- x -------->|
|
3643
|
-
# (x: distance measured in per unit (0~1)
|
3644
|
-
line = line_graphics.api_object
|
3645
|
-
|
3646
|
-
mid_bus = Bus(name=line.name + ' split',
|
3647
|
-
vnom=line.bus_from.Vnom,
|
3648
|
-
vmin=line.bus_from.Vmin,
|
3649
|
-
vmax=line.bus_from.Vmax)
|
3650
|
-
|
3651
|
-
bus_f_graphics_data = self.diagram.query_point(line.bus_from)
|
3652
|
-
bus_t_graphics_data = self.diagram.query_point(line.bus_to)
|
3653
|
-
bus_f_graphic_obj = self.graphics_manager.query(line.bus_from)
|
3654
|
-
bus_t_graphic_obj = self.graphics_manager.query(line.bus_to)
|
3655
|
-
|
3656
|
-
if bus_f_graphics_data is None:
|
3657
|
-
error_msg(f"{line.bus_from} was not found in the diagram")
|
3658
|
-
return None
|
3659
|
-
if bus_t_graphics_data is None:
|
3660
|
-
error_msg(f"{line.bus_to} was not found in the diagram")
|
3661
|
-
return None
|
3662
|
-
if bus_f_graphic_obj is None:
|
3663
|
-
error_msg(f"{line.bus_from} was not found in the graphics manager")
|
3664
|
-
return None
|
3665
|
-
if bus_t_graphic_obj is None:
|
3666
|
-
error_msg(f"{line.bus_to} was not found in the graphics manager")
|
3667
|
-
return None
|
3668
|
-
|
3669
|
-
# C(x, y) = (x1 + t * (x2 - x1), y1 + t * (y2 - y1))
|
3670
|
-
middle_bus_x = bus_f_graphics_data.x + (bus_t_graphics_data.x - bus_f_graphics_data.x) * position
|
3671
|
-
middle_bus_y = bus_f_graphics_data.y + (bus_t_graphics_data.y - bus_f_graphics_data.y) * position
|
3672
|
-
|
3673
|
-
# create first split
|
3674
|
-
br1 = Line(name=line.name + ' split 1',
|
3675
|
-
bus_from=line.bus_from,
|
3676
|
-
bus_to=mid_bus,
|
3677
|
-
r=line.R * position,
|
3678
|
-
x=line.X * position,
|
3679
|
-
b=line.B * position,
|
3680
|
-
r0=line.R0 * position,
|
3681
|
-
x0=line.X0 * position,
|
3682
|
-
b0=line.B0 * position,
|
3683
|
-
r2=line.R2 * position,
|
3684
|
-
x2=line.X2 * position,
|
3685
|
-
b2=line.B2 * position,
|
3686
|
-
length=line.length * position,
|
3687
|
-
rate=line.rate,
|
3688
|
-
contingency_factor=line.contingency_factor,
|
3689
|
-
protection_rating_factor=line.protection_rating_factor)
|
3690
|
-
|
3691
|
-
position_c = 1.0 - position
|
3692
|
-
br2 = Line(name=line.name + ' split 2',
|
3693
|
-
bus_from=mid_bus,
|
3694
|
-
bus_to=line.bus_to,
|
3695
|
-
r=line.R * position_c,
|
3696
|
-
x=line.X * position_c,
|
3697
|
-
b=line.B * position_c,
|
3698
|
-
r0=line.R0 * position_c,
|
3699
|
-
x0=line.X0 * position_c,
|
3700
|
-
b0=line.B0 * position_c,
|
3701
|
-
r2=line.R2 * position_c,
|
3702
|
-
x2=line.X2 * position_c,
|
3703
|
-
b2=line.B2 * position_c,
|
3704
|
-
length=line.length * position_c,
|
3705
|
-
rate=line.rate,
|
3706
|
-
contingency_factor=line.contingency_factor,
|
3707
|
-
protection_rating_factor=line.protection_rating_factor)
|
3708
|
-
|
3709
|
-
# deactivate the original line
|
3710
|
-
line_graphics.api_object.active = False
|
3711
|
-
line_graphics.api_object.active_prof.fill(False)
|
3712
|
-
line_graphics.set_enable(False)
|
3713
|
-
|
3714
|
-
# add to gridcal the new 2 lines and the bus
|
3715
|
-
self.circuit.add_bus(mid_bus)
|
3716
|
-
self.circuit.add_line(br1)
|
3717
|
-
self.circuit.add_line(br2)
|
3718
|
-
|
3719
|
-
# add new stuff as new investment
|
3720
|
-
inv_group = InvestmentsGroup(name=line.name + ' split', category='Line split')
|
3721
|
-
self.circuit.add_investments_group(inv_group)
|
3722
|
-
self.circuit.add_investment(
|
3723
|
-
Investment(name=mid_bus.name, device_idtag=mid_bus.idtag, group=inv_group))
|
3724
|
-
self.circuit.add_investment(Investment(name=br1.name, device_idtag=br1.idtag, group=inv_group))
|
3725
|
-
self.circuit.add_investment(Investment(name=br2.name, device_idtag=br2.idtag, group=inv_group))
|
3726
|
-
|
3727
|
-
# add to the schematic the new 2 lines and the bus
|
3728
|
-
middle_bus_graphics = self.add_api_bus(bus=mid_bus,
|
3729
|
-
injections_by_tpe=dict(),
|
3730
|
-
x0=middle_bus_x,
|
3731
|
-
y0=middle_bus_y)
|
3732
|
-
br1_graphics = self.add_api_line(branch=br1,
|
3733
|
-
bus_f_graphic0=bus_f_graphic_obj,
|
3734
|
-
bus_t_graphic0=middle_bus_graphics)
|
3735
|
-
br2_graphics = self.add_api_line(branch=br2,
|
3736
|
-
bus_f_graphic0=middle_bus_graphics,
|
3737
|
-
bus_t_graphic0=bus_t_graphic_obj)
|
3738
|
-
|
3739
|
-
self.add_to_scene(middle_bus_graphics)
|
3740
|
-
self.add_to_scene(br1_graphics)
|
3741
|
-
self.add_to_scene(br2_graphics)
|
3742
|
-
|
3743
|
-
# redraw
|
3744
|
-
bus_f_graphic_obj.arrange_children()
|
3745
|
-
bus_t_graphic_obj.arrange_children()
|
3746
|
-
middle_bus_graphics.arrange_children()
|
3747
|
-
else:
|
3748
|
-
error_msg("Incorrect position", 'Line split')
|
3772
|
+
self.split_line_now(line_graphics=line_graphics,
|
3773
|
+
position=position,
|
3774
|
+
extra_km=0.0)
|
3749
3775
|
|
3750
3776
|
def split_line_in_out(self, line_graphics: LineGraphicItem):
|
3751
3777
|
"""
|
3752
3778
|
Split line and create extra substations so that an in/out is formed
|
3753
3779
|
:param line_graphics: Original LineGraphicItem to split
|
3754
3780
|
"""
|
3781
|
+
title = "Split line with input/output"
|
3755
3782
|
dlg = InputNumberDialogue(min_value=1.0,
|
3756
3783
|
max_value=99.0,
|
3757
3784
|
is_int=False,
|
3758
|
-
title=
|
3785
|
+
title=title,
|
3759
3786
|
text="Enter the distance from the beginning of the \n"
|
3760
3787
|
"line as a percentage of the total length",
|
3761
3788
|
suffix=' %',
|
@@ -3772,8 +3799,8 @@ class DiagramEditorWidget(QSplitter):
|
|
3772
3799
|
dlg2 = InputNumberDialogue(min_value=0.01,
|
3773
3800
|
max_value=99999999.0,
|
3774
3801
|
is_int=False,
|
3775
|
-
title=
|
3776
|
-
text="Distance from the
|
3802
|
+
title=title,
|
3803
|
+
text="Distance from the splitting point",
|
3777
3804
|
suffix=' km',
|
3778
3805
|
decimals=2,
|
3779
3806
|
default_value=1.0)
|
@@ -3782,201 +3809,229 @@ class DiagramEditorWidget(QSplitter):
|
|
3782
3809
|
|
3783
3810
|
if dlg2.is_accepted:
|
3784
3811
|
|
3785
|
-
|
3786
|
-
|
3787
|
-
|
3788
|
-
|
3789
|
-
|
3790
|
-
|
3791
|
-
|
3792
|
-
|
3793
|
-
|
3794
|
-
|
3795
|
-
|
3796
|
-
|
3797
|
-
|
3798
|
-
|
3799
|
-
|
3800
|
-
|
3801
|
-
|
3802
|
-
|
3803
|
-
|
3804
|
-
|
3805
|
-
|
3806
|
-
|
3807
|
-
|
3808
|
-
|
3809
|
-
|
3810
|
-
|
3811
|
-
|
3812
|
-
|
3813
|
-
|
3814
|
-
|
3815
|
-
|
3816
|
-
|
3817
|
-
|
3818
|
-
|
3819
|
-
|
3820
|
-
|
3821
|
-
|
3822
|
-
|
3823
|
-
|
3824
|
-
|
3825
|
-
|
3826
|
-
|
3827
|
-
|
3828
|
-
|
3829
|
-
|
3830
|
-
|
3831
|
-
|
3832
|
-
|
3833
|
-
|
3834
|
-
|
3835
|
-
|
3836
|
-
|
3837
|
-
|
3838
|
-
|
3839
|
-
|
3840
|
-
|
3841
|
-
|
3842
|
-
|
3843
|
-
|
3844
|
-
|
3845
|
-
|
3846
|
-
|
3847
|
-
|
3848
|
-
|
3849
|
-
|
3850
|
-
|
3851
|
-
|
3852
|
-
|
3853
|
-
|
3854
|
-
|
3855
|
-
|
3856
|
-
|
3857
|
-
|
3858
|
-
|
3859
|
-
|
3860
|
-
|
3861
|
-
|
3862
|
-
|
3863
|
-
|
3864
|
-
|
3865
|
-
|
3866
|
-
|
3867
|
-
|
3868
|
-
|
3869
|
-
|
3870
|
-
|
3871
|
-
|
3872
|
-
|
3873
|
-
|
3874
|
-
|
3875
|
-
|
3876
|
-
|
3877
|
-
|
3878
|
-
|
3879
|
-
|
3880
|
-
|
3881
|
-
|
3882
|
-
|
3883
|
-
|
3884
|
-
|
3885
|
-
|
3886
|
-
|
3887
|
-
|
3888
|
-
|
3889
|
-
|
3890
|
-
|
3891
|
-
|
3892
|
-
|
3893
|
-
|
3894
|
-
|
3895
|
-
|
3896
|
-
|
3897
|
-
|
3898
|
-
|
3899
|
-
|
3900
|
-
|
3901
|
-
|
3902
|
-
|
3903
|
-
|
3904
|
-
|
3905
|
-
|
3906
|
-
|
3907
|
-
|
3908
|
-
|
3909
|
-
|
3910
|
-
|
3911
|
-
|
3912
|
-
|
3913
|
-
|
3914
|
-
|
3915
|
-
|
3916
|
-
|
3917
|
-
|
3918
|
-
|
3919
|
-
|
3920
|
-
|
3921
|
-
|
3922
|
-
|
3923
|
-
|
3924
|
-
|
3925
|
-
|
3926
|
-
|
3927
|
-
|
3928
|
-
|
3929
|
-
|
3930
|
-
|
3931
|
-
|
3932
|
-
|
3933
|
-
|
3934
|
-
|
3935
|
-
|
3936
|
-
|
3937
|
-
|
3938
|
-
|
3939
|
-
|
3940
|
-
|
3941
|
-
|
3942
|
-
|
3943
|
-
|
3944
|
-
|
3945
|
-
|
3946
|
-
|
3947
|
-
|
3948
|
-
|
3949
|
-
|
3950
|
-
|
3951
|
-
|
3952
|
-
|
3953
|
-
|
3954
|
-
|
3955
|
-
|
3956
|
-
|
3957
|
-
|
3958
|
-
|
3959
|
-
|
3960
|
-
|
3961
|
-
|
3962
|
-
|
3963
|
-
|
3964
|
-
|
3965
|
-
|
3966
|
-
|
3967
|
-
|
3968
|
-
|
3969
|
-
|
3970
|
-
|
3971
|
-
|
3972
|
-
|
3973
|
-
|
3974
|
-
|
3975
|
-
|
3976
|
-
|
3977
|
-
|
3978
|
-
|
3979
|
-
|
3812
|
+
create_extra_nodes = yes_no_question(text="Add extra buses?", title=title)
|
3813
|
+
|
3814
|
+
if create_extra_nodes:
|
3815
|
+
# Each of the Branches will have the proportional impedance
|
3816
|
+
# Bus_from Middle_bus Bus_To
|
3817
|
+
# o----------------------o--------------------o
|
3818
|
+
# >-------- x -------->|
|
3819
|
+
# (x: distance measured in per unit (0~1)
|
3820
|
+
line = line_graphics.api_object
|
3821
|
+
bus_f_graphics_data = self.diagram.query_point(line.bus_from)
|
3822
|
+
bus_t_graphics_data = self.diagram.query_point(line.bus_to)
|
3823
|
+
bus_f_graphic_obj = self.graphics_manager.query(line.bus_from)
|
3824
|
+
bus_t_graphic_obj = self.graphics_manager.query(line.bus_to)
|
3825
|
+
|
3826
|
+
if bus_f_graphics_data is None:
|
3827
|
+
error_msg(f"{line.bus_from} was not found in the diagram")
|
3828
|
+
return None
|
3829
|
+
if bus_t_graphics_data is None:
|
3830
|
+
error_msg(f"{line.bus_to} was not found in the diagram")
|
3831
|
+
return None
|
3832
|
+
if bus_f_graphic_obj is None:
|
3833
|
+
error_msg(f"{line.bus_from} was not found in the graphics manager")
|
3834
|
+
return None
|
3835
|
+
if bus_t_graphic_obj is None:
|
3836
|
+
error_msg(f"{line.bus_to} was not found in the graphics manager")
|
3837
|
+
return None
|
3838
|
+
|
3839
|
+
# C(x, y) = (x1 + t * (x2 - x1), y1 + t * (y2 - y1))
|
3840
|
+
mid_x = bus_f_graphics_data.x + (
|
3841
|
+
bus_t_graphics_data.x - bus_f_graphics_data.x) * position
|
3842
|
+
mid_y = bus_f_graphics_data.y + (
|
3843
|
+
bus_t_graphics_data.y - bus_f_graphics_data.y) * position
|
3844
|
+
|
3845
|
+
B1 = Bus(name=line.name + ' split bus 1',
|
3846
|
+
vnom=line.bus_from.Vnom,
|
3847
|
+
vmin=line.bus_from.Vmin,
|
3848
|
+
vmax=line.bus_from.Vmax,
|
3849
|
+
area=line.bus_from.area,
|
3850
|
+
zone=line.bus_from.zone,
|
3851
|
+
country=line.bus_from.country)
|
3852
|
+
|
3853
|
+
B2 = Bus(name=line.name + ' split bus 2',
|
3854
|
+
vnom=line.bus_from.Vnom,
|
3855
|
+
vmin=line.bus_from.Vmin,
|
3856
|
+
vmax=line.bus_from.Vmax,
|
3857
|
+
area=line.bus_from.area,
|
3858
|
+
zone=line.bus_from.zone,
|
3859
|
+
country=line.bus_from.country)
|
3860
|
+
|
3861
|
+
mid_sub = Substation(name=line.name + ' new bus',
|
3862
|
+
area=line.bus_from.area,
|
3863
|
+
zone=line.bus_from.zone,
|
3864
|
+
country=line.bus_from.country)
|
3865
|
+
mid_vl = VoltageLevel(name=line.name + ' new bus',
|
3866
|
+
substation=mid_sub)
|
3867
|
+
B3 = Bus(name=line.name + ' new bus',
|
3868
|
+
vnom=line.bus_from.Vnom,
|
3869
|
+
vmin=line.bus_from.Vmin,
|
3870
|
+
vmax=line.bus_from.Vmax,
|
3871
|
+
voltage_level=mid_vl,
|
3872
|
+
substation=mid_sub,
|
3873
|
+
area=line.bus_from.area,
|
3874
|
+
zone=line.bus_from.zone,
|
3875
|
+
country=line.bus_from.country)
|
3876
|
+
|
3877
|
+
# create first split
|
3878
|
+
br1 = Line(name=line.name + ' split 1',
|
3879
|
+
bus_from=line.bus_from,
|
3880
|
+
bus_to=B1,
|
3881
|
+
r=line.R * position,
|
3882
|
+
x=line.X * position,
|
3883
|
+
b=line.B * position,
|
3884
|
+
r0=line.R0 * position,
|
3885
|
+
x0=line.X0 * position,
|
3886
|
+
b0=line.B0 * position,
|
3887
|
+
r2=line.R2 * position,
|
3888
|
+
x2=line.X2 * position,
|
3889
|
+
b2=line.B2 * position,
|
3890
|
+
length=line.length * position,
|
3891
|
+
rate=line.rate,
|
3892
|
+
contingency_factor=line.contingency_factor,
|
3893
|
+
protection_rating_factor=line.protection_rating_factor)
|
3894
|
+
|
3895
|
+
position_c = 1.0 - position
|
3896
|
+
br2 = Line(name=line.name + ' split 2',
|
3897
|
+
bus_from=B2,
|
3898
|
+
bus_to=line.bus_to,
|
3899
|
+
r=line.R * position_c,
|
3900
|
+
x=line.X * position_c,
|
3901
|
+
b=line.B * position_c,
|
3902
|
+
r0=line.R0 * position_c,
|
3903
|
+
x0=line.X0 * position_c,
|
3904
|
+
b0=line.B0 * position_c,
|
3905
|
+
r2=line.R2 * position_c,
|
3906
|
+
x2=line.X2 * position_c,
|
3907
|
+
b2=line.B2 * position_c,
|
3908
|
+
length=line.length * position_c,
|
3909
|
+
rate=line.rate,
|
3910
|
+
contingency_factor=line.contingency_factor,
|
3911
|
+
protection_rating_factor=line.protection_rating_factor)
|
3912
|
+
|
3913
|
+
# kilometers of the in/out appart from the original line
|
3914
|
+
km_io = dlg2.value
|
3915
|
+
proportion_io = km_io / line.length
|
3916
|
+
|
3917
|
+
br3 = Line(name=line.name + ' in',
|
3918
|
+
bus_from=B1,
|
3919
|
+
bus_to=B3,
|
3920
|
+
r=line.R * proportion_io,
|
3921
|
+
x=line.X * proportion_io,
|
3922
|
+
b=line.B * proportion_io,
|
3923
|
+
r0=line.R0 * proportion_io,
|
3924
|
+
x0=line.X0 * proportion_io,
|
3925
|
+
b0=line.B0 * proportion_io,
|
3926
|
+
r2=line.R2 * proportion_io,
|
3927
|
+
x2=line.X2 * proportion_io,
|
3928
|
+
b2=line.B2 * proportion_io,
|
3929
|
+
length=line.length * proportion_io,
|
3930
|
+
rate=line.rate,
|
3931
|
+
contingency_factor=line.contingency_factor,
|
3932
|
+
protection_rating_factor=line.protection_rating_factor)
|
3933
|
+
|
3934
|
+
br4 = Line(name=line.name + ' out',
|
3935
|
+
bus_from=B3,
|
3936
|
+
bus_to=B2,
|
3937
|
+
r=line.R * proportion_io,
|
3938
|
+
x=line.X * proportion_io,
|
3939
|
+
b=line.B * proportion_io,
|
3940
|
+
r0=line.R0 * proportion_io,
|
3941
|
+
x0=line.X0 * proportion_io,
|
3942
|
+
b0=line.B0 * proportion_io,
|
3943
|
+
r2=line.R2 * proportion_io,
|
3944
|
+
x2=line.X2 * proportion_io,
|
3945
|
+
b2=line.B2 * proportion_io,
|
3946
|
+
length=line.length * proportion_io,
|
3947
|
+
rate=line.rate,
|
3948
|
+
contingency_factor=line.contingency_factor,
|
3949
|
+
protection_rating_factor=line.protection_rating_factor)
|
3950
|
+
|
3951
|
+
# deactivate the original line
|
3952
|
+
line_graphics.api_object.active = False
|
3953
|
+
line_graphics.api_object.active_prof.fill(False)
|
3954
|
+
line_graphics.set_enable(False)
|
3955
|
+
|
3956
|
+
# add to gridcal the new 2 lines and the bus
|
3957
|
+
self.circuit.add_bus(B1)
|
3958
|
+
self.circuit.add_bus(B2)
|
3959
|
+
self.circuit.add_bus(B3)
|
3960
|
+
self.circuit.add_line(br1)
|
3961
|
+
self.circuit.add_line(br2)
|
3962
|
+
self.circuit.add_line(br3)
|
3963
|
+
self.circuit.add_line(br4)
|
3964
|
+
|
3965
|
+
# add new stuff as new investment
|
3966
|
+
inv_group = InvestmentsGroup(name=line.name + ' in/out', category='Line in/out')
|
3967
|
+
self.circuit.add_investments_group(inv_group)
|
3968
|
+
self.circuit.add_investment(
|
3969
|
+
Investment(name=B1.name, device_idtag=B1.idtag, group=inv_group))
|
3970
|
+
self.circuit.add_investment(
|
3971
|
+
Investment(name=B2.name, device_idtag=B2.idtag, group=inv_group))
|
3972
|
+
self.circuit.add_investment(
|
3973
|
+
Investment(name=B3.name, device_idtag=B3.idtag, group=inv_group))
|
3974
|
+
self.circuit.add_investment(
|
3975
|
+
Investment(name=br1.name, device_idtag=br1.idtag, group=inv_group))
|
3976
|
+
self.circuit.add_investment(
|
3977
|
+
Investment(name=br2.name, device_idtag=br2.idtag, group=inv_group))
|
3978
|
+
self.circuit.add_investment(
|
3979
|
+
Investment(name=br3.name, device_idtag=br3.idtag, group=inv_group))
|
3980
|
+
self.circuit.add_investment(
|
3981
|
+
Investment(name=br4.name, device_idtag=br4.idtag, group=inv_group))
|
3982
|
+
|
3983
|
+
# add to the schematic the new 2 lines and the bus
|
3984
|
+
B1_graphics = self.add_api_bus(bus=B1,
|
3985
|
+
injections_by_tpe=dict(),
|
3986
|
+
x0=mid_x,
|
3987
|
+
y0=mid_y)
|
3988
|
+
|
3989
|
+
B2_graphics = self.add_api_bus(bus=B2,
|
3990
|
+
injections_by_tpe=dict(),
|
3991
|
+
x0=mid_x,
|
3992
|
+
y0=mid_y)
|
3993
|
+
|
3994
|
+
B3_graphics = self.add_api_bus(bus=B3,
|
3995
|
+
injections_by_tpe=dict(),
|
3996
|
+
x0=mid_x,
|
3997
|
+
y0=mid_y)
|
3998
|
+
|
3999
|
+
br1_graphics = self.add_api_line(branch=br1,
|
4000
|
+
bus_f_graphic0=bus_f_graphic_obj,
|
4001
|
+
bus_t_graphic0=B1_graphics)
|
4002
|
+
|
4003
|
+
br2_graphics = self.add_api_line(branch=br2,
|
4004
|
+
bus_f_graphic0=B2_graphics,
|
4005
|
+
bus_t_graphic0=bus_t_graphic_obj)
|
4006
|
+
|
4007
|
+
br3_graphics = self.add_api_line(branch=br3,
|
4008
|
+
bus_f_graphic0=B1_graphics,
|
4009
|
+
bus_t_graphic0=B3_graphics)
|
4010
|
+
|
4011
|
+
br4_graphics = self.add_api_line(branch=br4,
|
4012
|
+
bus_f_graphic0=B3_graphics,
|
4013
|
+
bus_t_graphic0=B2_graphics)
|
4014
|
+
|
4015
|
+
self.add_to_scene(B1_graphics)
|
4016
|
+
self.add_to_scene(B2_graphics)
|
4017
|
+
self.add_to_scene(B3_graphics)
|
4018
|
+
self.add_to_scene(br1_graphics)
|
4019
|
+
self.add_to_scene(br2_graphics)
|
4020
|
+
self.add_to_scene(br3_graphics)
|
4021
|
+
self.add_to_scene(br4_graphics)
|
4022
|
+
|
4023
|
+
# redraw
|
4024
|
+
bus_f_graphic_obj.arrange_children()
|
4025
|
+
bus_t_graphic_obj.arrange_children()
|
4026
|
+
B1_graphics.arrange_children()
|
4027
|
+
B2_graphics.arrange_children()
|
4028
|
+
B3_graphics.arrange_children()
|
4029
|
+
else:
|
4030
|
+
self.split_line_now(line_graphics=line_graphics,
|
4031
|
+
position=position,
|
4032
|
+
extra_km=dlg2.value)
|
4033
|
+
else:
|
4034
|
+
pass
|
3980
4035
|
else:
|
3981
4036
|
error_msg("Incorrect position", 'Line split')
|
3982
4037
|
|