Skip to main content

IEEE 33-Bus single-line diagram drawing primitives based on Baran.1989

Project description

IeeeTopologyDiagrams

IEEE 33-Bus single-line diagram drawing primitives based on Baran.1989 Figure 2.

Install

cd v3/
python -m pip install -e .

Python API

from ieee33bus_lib 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_fig1.py           # full diagram main script
├── save_*.py                   # individual element export scripts (13)
└── *.png                       # element output images (12)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ieeetopologydiagrams-3.0.1.tar.gz (8.1 kB view details)

Uploaded Source

File details

Details for the file ieeetopologydiagrams-3.0.1.tar.gz.

File metadata

  • Download URL: ieeetopologydiagrams-3.0.1.tar.gz
  • Upload date:
  • Size: 8.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for ieeetopologydiagrams-3.0.1.tar.gz
Algorithm Hash digest
SHA256 142f78d7b021bb6463c0b80b4119bfb1b899a5145c8a62e0e82a71289de721d9
MD5 18c065bd112033622455cc07e9ec7345
BLAKE2b-256 53607e053e2df4f80e2a45133e6fb814f0a2afbe23c2fd4cb0dfe67d12a3da35

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page