NREL / ditto

DiTTo is a Distribution Transformation Tool that aims at providing an open source framework to convert various distribution systems modeling formats.
https://nrel.github.io/ditto/
BSD 3-Clause "New" or "Revised" License
69 stars 36 forks source link

windmil_ascii reader throws exception on numeric phase configs #284

Open dugganj opened 5 years ago

dugganj commented 5 years ago

Windmil .seq files allow using either alpha phase descriptors ('ABC') or numeric phase descriptors (7) -- from the windmil help file: Element Phase Configuration The phase configuration can be described using an integer 1-7, a string A-ABC, or even a phase ordering such as CBA, BCA, etc.

1 = A, 2 = B, 3 = C, 4 = AB, 5 = AC, 6 = BC, 7 = ABC

Using the numeric version causes an exception: INFO:ditto.readers.abstract_reader:Succesful! INFO:ditto.readers.abstract_reader:Parsing the lines... Traceback (most recent call last): File "C:/FCUtil/Software/Python/FCUtil4/Ditto/ImportWindmil.py", line 18, in main() File "C:/FCUtil/Software/Python/FCUtil4/Ditto/ImportWindmil.py", line 11, in main wReader.parse(m, verbose=True) File "C:\Users\dugganj\Miniconda3\lib\site-packages\ditto\readers\windmil_ascii\read.py", line 67, in parse super(Reader, self).parse(model, **kwargs) File "C:\Users\dugganj\Miniconda3\lib\site-packages\ditto\readers\abstract_reader.py", line 800, in parse s = self.parse_lines(model) File "C:\Users\dugganj\Miniconda3\lib\site-packages\ditto\readers\windmil_ascii\read.py", line 108, in parse_lines self.create_device(model, node1, node2, Devices) File "C:\Users\dugganj\Miniconda3\lib\site-packages\ditto\readers\windmil_ascii\read.py", line 131, in create_device phase_list = self.phase_2_index[phases] KeyError: '7'

tarekelgindy commented 5 years ago

@AadilLatif primarily worked on this reader. Do you have any insight into this?