Giter Site home page Giter Site logo

trellixvulnteam / ditto_vlm7 Goto Github PK

View Code? Open in Web Editor NEW

This project forked from nrel/ditto

0.0 0.0 0.0 17.08 MB

DiTTo is a Distribution Transformation Tool that aims at providing an open source framework to convert various distribution systems modeling formats.

Home Page: https://nrel.github.io/ditto/

License: BSD 3-Clause "New" or "Revised" License

Python 99.97% Makefile 0.01% Dockerfile 0.02%

ditto_vlm7's Introduction

DiTTo

codecov

DiTTo is the Distribution Transformation Tool. It is an open source tool to convert and modify electrical distribution system models. The most common domain of electrical distribution systems is from substations to customers.

How it Works

Flexible representations for power system components are defined in the ditto models defined here DiTTo implements a many-to-one-to-many parsing framework which makes it modular and robust. The reader modules parse data files of distribution system format (e.g. OpenDSS) and create an object for each electrical component. These objects are stored in a Store instance. The writer modules are then used to export the data stored in memory to a selected output distribution system format (e.g. Gridlab-D) which are written to disk.

Additional functionality can be found in the documentation here.

Quick Start

Install DiTTo

pip install ditto.py

This will install the basic version of ditto with limited dependencies. Because ditto supports conversion between many multiple formats, dependencies can be specified during installation For example:

pip install "ditto.py[extras,opendss,gridlabd]"

will install the required dependencies to convert between opendss and gridlab-d

To install the full dependency list run:

pip install "ditto.py[all]"

which is the same as

pip install "ditto.py[extras,opendss,cyme,dew,ephasor,synergi,gridlabd]" # same as `pip install "ditto.py[all]"`

Basic Usage

The most basic capability of DiTTo is the conversion of a distribution system from one format to another. To convert a cyme model represented in ASCII format with network.txt, equipment.txt and load.txt files, the following python script can be run to perform the conversion

from ditto.store import Store
from ditto.readers.cyme.read import Reader
from ditto.writers.opendss.write import Writer

store = Store()
reader = Reader(data_folder_path = '.', network_file='network.txt',equipment_file = 'equipment.txt', load_file = 'load.txt')
reader.parse(store)
writer = Writer(output_path='.')
writer.write(store)

The required input files for each reader format are defined in the folder of each reader

Command Line Interface

Ditto can also be run as a command line tool to perform basic conversion. The CLI accepts only one input file whatever the format. If we have a gridlabd model entirely stored in a file called model.glm we can use:

$ ditto-cli convert --from glm --input ./model.glm --to cyme

For formats like CYME where multiple input files are needed, a simple JSON configuration file is supplied:

{
    "data_folder_path": ".",
    "network_filename": "network.txt",
    "equipment_filename": "equipment.txt",
    "load_filename": "load.txt"
}

A default configuration file is found each reader folder. So to convert the cyme files described in the python program above, the following command would be used:

$ ditto-cli convert --from cyme --input ./config.json --to dss

Documentation on converting other formats can be found here.

Contributing

DiTTo is an open source project and contributions are welcome! Either for a simple typo, a bugfix, or a new parser you want to integrate, feel free to contribute.

To contribute to Ditto in 3 steps:

  • Fork the repository (button in the upper right corner of the DiTTo GitHub page).
  • Create a feature branch on your local fork and implement your modifications there.
  • Once your work is ready to be shared, submit a Pull Request on the DiTTo GitHub page. See the official GitHub documentation on how to do that here

Getting Help

If you are having issues using DiTTo, feel free to open an Issue on GitHub here

All contributions are welcome. For questions about collaboration please email Tarek Elgindy

ditto_vlm7's People

Contributors

anjoman avatar britt-camus avatar brittbinler avatar daniel-thom avatar etimberg avatar kavuribhavya avatar kdheepak avatar nicolasgensollen avatar tarekelgindy avatar tareknrel avatar trellixvulnteam avatar xzhu628 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.