IEEE 33-Bus single-line diagram drawing primitives based on Baran.1989 (Main Version)
Project description
IeeeTopologyDiagrams
IEEE 33-Bus single-line diagram drawing primitives based on Baran.1989 Figure 2.
Install
pip install IeeeTopologyDiagrams
Quick Start: Generate the Complete Diagram
Generate the standard IEEE 33-Bus single-line diagram with one command:
IeeeTopologyDiagrams-fig2
Or use Python API:
from IeeeTopologyDiagrams.reproduce_fig2 import draw_ieee33bus_diagram
# Generate and save to current directory
draw_ieee33bus_diagram()
# Or specify output path
draw_ieee33bus_diagram('my_diagram.png')
Python API
from IeeeTopologyDiagrams import (
draw_switch, # horizontal closed switch
draw_switch_vertical, # vertical closed switch
draw_switch_open, # horizontal open switch
draw_switch_open_vertical, # vertical open switch
draw_bar_node, # vertical bus bar node
draw_bar_node_switched, # horizontal node + switch module
draw_node, # load node
draw_tf_node, # transformer node
draw_substation_vertical, # vertical substation (SS1)
draw_substation_horizontal, # horizontal substation (SS2)
)
CLI
IeeeTopologyDiagrams-fig2 # Full Fig.2 single-line diagram
IeeeTopologyDiagrams-switch # horizontal closed switch → switch_symbol.png
IeeeTopologyDiagrams-switch-vertical # vertical closed switch → switch_vertical.png
IeeeTopologyDiagrams-switch-open-h # horizontal open switch → switch_open_h.png
IeeeTopologyDiagrams-switch-open-v # vertical open switch → switch_open_v.png
IeeeTopologyDiagrams-bar-node-short # vertical bus bar node → bar_node_short.png
IeeeTopologyDiagrams-bar-node-horizontal # horizontal bus bar node → bar_node_horizontal.png
IeeeTopologyDiagrams-node15 # node 15 module → node15.png
IeeeTopologyDiagrams-load-node # load node → load_node.png
IeeeTopologyDiagrams-tf-node # transformer node → tf_node.png
IeeeTopologyDiagrams-ss1 # SS1 substation → ss1_symbol.png
IeeeTopologyDiagrams-ss2 # SS2 substation → ss2_symbol.png
Standalone Scripts
All save_*.py can be run directly to export individual element PNGs:
cd v3/
python save_switch_symbol.py # horizontal closed switch
python save_switch_vertical.py # vertical closed switch
python save_switch_open.py # switch comparison (open/closed × h/v)
python save_switch_open_h.py # horizontal open switch
python save_switch_open_v.py # vertical open switch
python save_bar_node_short.py # vertical bus bar node
python save_bar_node_horizontal.py # horizontal bus bar node
python save_node15.py # node 15 module (horizontal bar + vertical switch)
python save_load_node.py # load node
python save_tf_node.py # transformer node
python save_ss1_symbol.py # SS1 vertical substation
python save_ss2_symbol.py # SS2 horizontal substation
python reproduce_fig1.py # full single-line diagram
Element Reference
| Element | Element (CN) | PNG | CLI |
|---|---|---|---|
| Horizontal closed switch | 水平闭合开关 | switch_symbol.png |
...-switch |
| Vertical closed switch | 垂直闭合开关 | switch_vertical.png |
...-switch-vertical |
| Horizontal open switch | 水平断开开关 | switch_open_h.png |
...-switch-open-h |
| Vertical open switch | 垂直断开开关 | switch_open_v.png |
...-switch-open-v |
| Vertical bus bar node | 竖形母线节点 | bar_node_short.png |
...-bar-node-short |
| Horizontal bus bar node | 横形母线节点 | bar_node_horizontal.png |
...-bar-node-horizontal |
| Node 15 module | 节点15模块 | node15.png |
...-node15 |
| Load node | 负荷节点 | load_node.png |
...-load-node |
| Transformer node | 配变节点 | tf_node.png |
...-tf-node |
| SS1 substation | SS1变电站 | ss1_symbol.png |
...-ss1 |
| SS2 substation | SS2变电站 | ss2_symbol.png |
...-ss2 |
| Full diagram | 完整单线图 | Figure 2 - ...png |
...-fig2 |
Package Structure
v3/
├── pyproject.toml
├── README.md / README_CN.md
├── ieee33bus_lib/ # core library
│ ├── __init__.py
│ ├── drawing_elements.py # all drawing primitives
│ ├── coordinates.py # IEEE 33-Bus coordinates
│ └── cli.py # CLI entry points
├── reproduce_fig2.py # full diagram main script
├── save_*.py # individual element export scripts (13)
└── *.png # element output images (12)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ieeetopologydiagrams-4.0.1.tar.gz.
File metadata
- Download URL: ieeetopologydiagrams-4.0.1.tar.gz
- Upload date:
- Size: 12.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
65ce97b8da8de6ad88c286afa692877cfd21c552e4a45abfb70dce08510bda3b
|
|
| MD5 |
7b999aa516554d68c2b74bc6cf6918af
|
|
| BLAKE2b-256 |
f806001b5e8f87d872b02065984c41f2e49df980d43b7301d53a1fa82f449383
|
File details
Details for the file ieeetopologydiagrams-4.0.1-py3-none-any.whl.
File metadata
- Download URL: ieeetopologydiagrams-4.0.1-py3-none-any.whl
- Upload date:
- Size: 14.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
02fd580639ef8657dcea588d88949ad42eb4e23ccf2b32df7a825073607cf75c
|
|
| MD5 |
79466d04d89b1a976258205dcce36af1
|
|
| BLAKE2b-256 |
1b0f79d193257805318ad09fad801b9af19ddb2d8ebea81c31efe5814bf17ae4
|