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.

IEEE 33-Bus Single-Line Diagram

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_fig1 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_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.1.0.tar.gz (11.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ieeetopologydiagrams-3.1.0-py3-none-any.whl (13.1 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for ieeetopologydiagrams-3.1.0.tar.gz
Algorithm Hash digest
SHA256 b944819a2cc56233f11661ba801efb6788f446fa1b2ef609cb15f84802b79d30
MD5 5e897981307864a1b00d7f70bb854c71
BLAKE2b-256 8d430294a80cc53e165aea1644b16a9472257c4ea046989507864782a8e524ea

See more details on using hashes here.

File details

Details for the file ieeetopologydiagrams-3.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for ieeetopologydiagrams-3.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d08f24d3ae414124665625df77da1310c205cd6508f4c7f87bc3d02fc293f2b3
MD5 8cc9e8db4f8fa5e995aa130a0cbd97d4
BLAKE2b-256 a75c177c39e3f03a2d85f4fdb5df7a31d5b8a10182b75d75bc5c41d26d6dca42

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