Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Separate but Interconnected Diagrams for Power Network Sections #324

Open
yns0671 opened this issue Nov 13, 2024 · 3 comments
Open

Separate but Interconnected Diagrams for Power Network Sections #324

yns0671 opened this issue Nov 13, 2024 · 3 comments

Comments

@yns0671
Copy link

yns0671 commented Nov 13, 2024

Is your feature request related to a problem? Please describe.
I'm looking for a way to separate different parts of the power network, such as distribution and transmission, into different diagrams. However, these diagrams should still be connected or linked, as they are part of the same network. It can be challenging to analyze or visualize complex power systems without dividing them into different sections while maintaining interconnections.

Describe the solution you'd like
I would like to have the ability to create separate diagrams for different network sections (e.g., transmission and distribution) and link them so that they act as part of a single network. This would allow each section to be displayed on its own diagram, but any changes or data affecting one diagram would also reflect in the others where they are linked.

@SanPen
Copy link
Owner

SanPen commented Nov 13, 2024

Hi! This is exactly how it works.

You can create new diagrams in a variety of ways:

  • diagrams->new diagram from selection
  • On the database tables, select some device (i.e a bus) right click, new vecinity diagram
  • Right click on a map substation -> show diagram

When simulating, all the elements in the database regardless of the diagram are simulated together.

Let me know if you manage.

@yns0671
Copy link
Author

yns0671 commented Nov 13, 2024

Is there a way to do this on a script. for example i have created one part, to that file i will add the second part with code as a new diagram. or maybe in a single code i will create two grids using grid = gce.MultiCircuit() (gce is Gridcalengine)

@SanPen
Copy link
Owner

SanPen commented Nov 13, 2024

You can easily do that by adding a circuit in the GUI with "import circuit"

You can generate a schematic diagram with the function generate_schematic_diagram located from from GridCal.Gui.Diagrams.SchematicWidget.schematic_widget import generate_schematic_diagram and then, I suppose that you need to add the diagram to the circuit with add_diagram.

from GridCal.Gui.Diagrams.SchematicWidget.schematic_widget import generate_schematic_diagram

# load the grid or whatever....

diagram = generate_schematic_diagram(buses=circuit.get_buses(),
                                                     busbars=circuit.get_bus_bars(),
                                                     connecivity_nodes=circuit.get_connectivity_nodes(),
                                                     lines=circuit.get_lines(),
                                                     dc_lines=circuit.get_dc_lines(),
                                                     transformers2w=circuit.get_transformers2w(),
                                                     transformers3w=circuit.get_transformers3w(),
                                                     windings=circuit.get_windings(),
                                                     hvdc_lines=circuit.get_hvdc(),
                                                     vsc_devices=circuit.get_vsc(),
                                                     upfc_devices=circuit.get_upfc(),
                                                     series_reactances=circuit.get_series_reactances(),
                                                     switches=circuit.get_switches(),
                                                     fluid_nodes=circuit.get_fluid_nodes(),
                                                     fluid_paths=circuit.get_fluid_paths(),
                                                     explode_factor=1.0,
                                                     prog_func=None,
                                                     text_func=None)

circuit.add_diagram(diagram)

Bear in mind that that is an internal function and it may be subject to change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants