Skip to main content

A repository for performing network reduction on distribution network model.

Project description

⚡ Getting Started with grid-reducer

Build Python License Coverage

View Full Documentation..

Welcome! Follow the steps below to get grid-reducer up and running locally.
We recommend using a Python virtual environment for a clean install 🔒🐍.

🧪 Step 1: Set Up a Python Environment

To avoid dependency conflicts, create and activate a virtual environment.

You can use any tool of your choice — here are a few popular options:

🟢 Option A: Using venv (Standard Library)
python3 -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate
🔵 Option B: Using conda
conda create -n grid-reducer-env python=3.10
conda activate grid-reducer-env

🚀 Step 2: Install the Project Locally

Install the project in editable mode so changes to the code reflect immediately:

pip install grid_reducer

✅ This will also install all required dependencies.

🛠 Example CLI Usage

Once installed, you can use command line interface. Run grid --help to see all the available command options.

Here is a minimal example to reduce OpenDSS model.

grid reduce -f Master.dss

Example Python Usage

You can also reduce the feeder model through python scripts.

Here is a minimal example to reduce OpenDSS feeder model using Python Script.

from pathlib import Path

from grid_reducer.reducer import OpenDSSModelReducer

file_path = "master.dss"
reducer = OpenDSSModelReducer(master_dss_file=file_path)
reduced_ckt = reducer.reduce(transform_coordinate=True)

out_folder = Path("outputs")
out_folder.mkdir(parents=True, exist_ok=True)
original_circuit_file = out_folder / "original_ckt.dss"
reduced_circuit_file = out_folder / "reduced_ckt.dss"
reducer.export_original_ckt(original_circuit_file)
reducer.export(reduced_ckt, reduced_circuit_file)

📌 Notes

  • This is the recommended way to use the project during development.
  • In the future, the project may support installation via:
pip install grid-reducer

Stay tuned for updates! 📬

Need help? Feel free to open an issue or reach out to the maintainers. 💬

Attribution and Disclaimer

This software was created under a project sponsored by the U.S. Department of Energy’s Office of Electricity, an agency of the United States Government. Neither the United States Government nor the United States Department of Energy, nor Battelle, nor any of their employees, nor any jurisdiction or organization that has cooperated in the development of these materials, makes any warranty, express or implied, or assumes any legal liability or responsibility for the accuracy, completeness, or usefulness or any information, apparatus, product, software, or process disclosed, or represents that its use would not infringe privately owned rights.

Reference herein to any specific commercial product, process, or service by trade name, trademark, manufacturer, or otherwise does not necessarily constitute or imply its endorsement, recommendation, or favoring by the United States Government or any agency thereof, or Battelle Memorial Institute. The views and opinions of authors expressed herein do not necessarily state or reflect those of the United States Government or any agency thereof.

PACIFIC NORTHWEST NATIONAL LABORATORY

operated by BATTELLE

for the UNITED STATES DEPARTMENT OF ENERGY

under Contract DE-AC05-76RL01830

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

grid_reducer-1.0.0.tar.gz (70.0 kB view details)

Uploaded Source

Built Distribution

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

grid_reducer-1.0.0-py3-none-any.whl (79.7 kB view details)

Uploaded Python 3

File details

Details for the file grid_reducer-1.0.0.tar.gz.

File metadata

  • Download URL: grid_reducer-1.0.0.tar.gz
  • Upload date:
  • Size: 70.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for grid_reducer-1.0.0.tar.gz
Algorithm Hash digest
SHA256 1a2d0133a7293265ed908a8d713f84c00f46e713c07b499878dbee000e06280a
MD5 49cdf1611404f953d2e1c1b56afbe9f2
BLAKE2b-256 be5d55d22d572e5b2762fd86037540b5ed2a066ee96988ceeff338e7e63a1a8d

See more details on using hashes here.

Provenance

The following attestation bundles were made for grid_reducer-1.0.0.tar.gz:

Publisher: publish.yml on Grid-Atlas/grid-reducer

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file grid_reducer-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: grid_reducer-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 79.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for grid_reducer-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 67581beb81ab2f925aa418a9233cb5541973dcc0f7b242bb0a09d7dc98d4a071
MD5 42dadc0fa4759089602264cea693b0f6
BLAKE2b-256 ea56d71fbd6906b65d6356f2bd2a222fb18767ac91d6950e674aa4fb43b977f5

See more details on using hashes here.

Provenance

The following attestation bundles were made for grid_reducer-1.0.0-py3-none-any.whl:

Publisher: publish.yml on Grid-Atlas/grid-reducer

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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