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.
Flexible representations for power system components are defined in Grid-Data-Models (GDM) format. DiTTo implements a many-to-one-to-many parsing framework, making 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 GDM DistributionSystem instance. The writer modules are then used to export the data stored in memory to a selected output distribution system format (e.g. OpenDSS) which are written to disk.
Additional documentation is currently under development and will e made available soon.
git clone https://github.com/NREL-Distribution-Suites/ditto.git
Navigate to the clone directory and use the following command to install
pip install -e.
The most basic capability of DiTTo is converting 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.readers.cim_iec_61968_13.reader import Reader
from ditto.writers.opendss.write import Writer
cim_reader = Reader(ieee13_node_xml_file)
cim_reader.read()
system = cim_reader.get_system()
writer = Writer(system)
new_dss_file = Path(__file__).parent / "model"
writer.write(output_path=new_dss_file, separate_substations=False, separate_feeders=False)
The required input files for each reader format are defined in the folder of each reader
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
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