Skip to main content

Python functions for extracting, executing routines, etc. from projects modeled in OpenDSS

Project description

OpenPy-fx-tools-DSS

Python functions for extracting, executing routines, etc. from projects modeled in OpenDSS

Install

With pip

pip install openpy-fx-tools-dss

How to use

First, in the IDE (Integrated Development Environment) of preference, we import the library:

import openpy_fx_tools_dss as fx_dss

Examples

The library has IEEE example circuits (Table 1), which can be found in the OpenDSS installation files. For the example files the class examples_lib() is called:

Table 1. Sample tests

Name Option DSS files xlsx file
13BusIEEE 1 x x
37BusIEEE 2 x x
123BusIEEE 3 x x
test = fx_dss.examples_lib()

To use the .DSS files:

DSS_path = test.load_examples_DSS()

To use .xlsx file:

xlsx_path = test.load_examples_xlsx()

OpenDSS to xlsx and vice versa

The functions that generate OpenDSS scripts to a .xlsx file and vice versa are inside the xlsx_DSS_xlsx() class and are called in the following way:

xlsx = fx_dss.xlsx_DSS_xlsx()

Template xlsx

An .xlsx template with the OpenDSS elements is created by calling the create_template_xlsx function as follows:

xlsx.create_template_xlsx(
    path_save: str = None, 
    prj_name: str = 'default', 
    elem_list: list = [], 
    all_elem: bool = True
)

xlsx to OpenDSS

The circuit data is entered in the .xlsx template. Each sheet of the template corresponds to the elements that are modeled in OpenDSS. When generating the OpenDSS scripts, only the cells that are not empty are considered. For this purpose, the xlsx_to_OpenDSS function is called as follows:

xlsx.xlsx_to_OpenDSS(
    xlsx_path=xlsx_path['xlsx_path'],
    path_save=xlsx_path['path_save'],
    prj_name=DSS_path['prj_name']
)

Important:

  • Do not alter the names of the sheets, and columns, since the element will not be taken into account.
  • The form of data entry must coincide with the OpenDSS specifications.

OpenDSS to xlsx

From an OpenDSS file, the xlsx template can be generated. For this purpose, the OpenDSS_to_xlsx function is used as follows:

xlsx.OpenDSS_to_xlsx(
    DSS_path=DSS_path['DSS_path'],
    path_save=DSS_path['path_save'],
    prj_name=DSS_path['prj_name']
)

License

License: CC BY-NC-SA 4.0

Creative Commons License

This work has a license Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.

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

openpy_fx_tools_dss-0.1.3.tar.gz (1.0 MB view details)

Uploaded Source

Built Distribution

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

openpy_fx_tools_dss-0.1.3-py3-none-any.whl (1.0 MB view details)

Uploaded Python 3

File details

Details for the file openpy_fx_tools_dss-0.1.3.tar.gz.

File metadata

  • Download URL: openpy_fx_tools_dss-0.1.3.tar.gz
  • Upload date:
  • Size: 1.0 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.8.8

File hashes

Hashes for openpy_fx_tools_dss-0.1.3.tar.gz
Algorithm Hash digest
SHA256 db80254df49be50851cc0827ae082a079c3a300d7f7c6e069343fe2ac62253ec
MD5 d07049fc1355449d597329347ff23d70
BLAKE2b-256 67688f4e35c89c720fea79b1d781cd712f59fcf19b50b440c70e5ffd102029dc

See more details on using hashes here.

File details

Details for the file openpy_fx_tools_dss-0.1.3-py3-none-any.whl.

File metadata

File hashes

Hashes for openpy_fx_tools_dss-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 50965129c2cfc8cd32424d7be3265ece7f40668e71a655aca8ac8f1233c2e68e
MD5 de9ed547c3a8ff6c97ddd7eb2271c6a3
BLAKE2b-256 d1cf9e934a6fc2d4250532822960df161edafb1620ec4568ddc8e2ccecf5a334

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