My process from beginning to end:
I downloaded DiTTo using this command ->
pip install git+https://github.com/NREL/ditto.git@v0.1.0#egg=ditto[all]
straight from the GitHub. I quickly realized that wasn't the most up-to-date version of DiTTo so I redownloaded with ->
pip install git+https://github.com/NREL/ditto.git@v0.2.1#egg=ditto[all]
Now when I run pip list in my Anaconda prompt I see:
ditto 0.1.0
ditto.py 0.2.1
I'm not entirely sure why both appear. I worry that my problems are caused by the old DiTTo version but I believe the new
ditto.py was working.
Regardless, I thought it could be helpful. Here is the header for the CYME load.txt file:
>>> Writing to OpenDSS...
Could not extract XHL from regulator Reg_regname
Could not extract XLT from regulator Reg_regname
Could not extract XHT from regulator Reg_regname
Traceback (most recent call last):
File "test_cyme_to_opendss.py", line 59, in <module>
main()
File "test_cyme_to_opendss.py ", line 54, in main
w.write(model)
File "C:\Users\Username\Anaconda3\lib\site-packages\ditto\writers\opendss\write.py", line 247, in write
s = self.write_master_file(model)
File "C:\Users\ Username \Anaconda3\lib\site-packages\ditto\writers\opendss\write.py", line 3900, in write_master_file
feeder_name == "" and i.nominal_voltage < 30000
TypeError: '<' not supported between instances of 'NoneType' and 'int'
I don't know CYME files all that well but I got past the issue by doing this in C:\Users\Username\Anaconda3\lib\site-packages\ditto\writers\opendss\write.py:
feeder_name == "" and i.nominal_voltage is not None and i.nominal_voltage < 30000
Rather than include line numbers here I just searched through the code for the statement which happened to be unique.
I don't know if that left my Regulator not doing what it was supposed to but it shows up in my dss files and I can still run it in OpenDSS:
New Transformer.trans_Reg_org_name999_A phases=1 windings=2 buses=(org_name999.1,org_name999.1) conns=(Wye, Wye) kvs=(7.2, 7.2) kvas=(108.0, 108.0)
New RegControl.Reg_org_name999_A transformer=trans_Reg_org_name999_A winding=2 CTprim=50.0 ptratio=60.0 band=2.4 vreg=124.0 Ptphase=1
I was getting the following error because it couldn't parse out whether my CYME was using IMPERIAL or SI. I hard-coded Imperial to solve the problem:
raise ValueError("Could not find [SI] or [IMPERIAL] unit system information. Unable to parse.")
Once I had DiTTo running, I converted my files but I saw patterns like this:
New Load.Load_org_name999_A_B_C_A_B_C_A_B_C_A_B_C_A_B_C_A_B_C_A_B_C_A_B_C bus1=org_name899.1.2.3.1.2.3.1.2.3.1.2.3.1.2.3.1.2.3.1.2.3.1.2.3 kV=12.47 model=1 kW=330.99999699999984 kvar=0.0 Phases=24
Why is this happening?
I ended up having to change each of these lines using a script so .1.2.3.1.2.3... became .1.2.3 and the Phases became 3.
Is this because we have CYME Customer Loads as follows?
Is it turning each of these loads into an extra Phase?
My process from beginning to end: I downloaded DiTTo using this command ->
pip install git+https://github.com/NREL/ditto.git@v0.1.0#egg=ditto[all]
straight from the GitHub. I quickly realized that wasn't the most up-to-date version of DiTTo so I redownloaded with ->pip install git+https://github.com/NREL/ditto.git@v0.2.1#egg=ditto[all]
Now when I run pip list in my Anaconda prompt I see:
I'm not entirely sure why both appear. I worry that my problems are caused by the old DiTTo version but I believe the new ditto.py was working.
Regardless, I thought it could be helpful. Here is the header for the CYME load.txt file:
An error I received was the following:
In this case, i.nominal_voltage was NoneType.
Here are the Regulator Settings for CYME:
I don't know CYME files all that well but I got past the issue by doing this in C:\Users\Username\Anaconda3\lib\site-packages\ditto\writers\opendss\write.py:
feeder_name == "" and i.nominal_voltage is not None and i.nominal_voltage < 30000
Rather than include line numbers here I just searched through the code for the statement which happened to be unique.I don't know if that left my Regulator not doing what it was supposed to but it shows up in my dss files and I can still run it in OpenDSS:
Another issue I ran into has been shared on the GitHub and I used that solution to solve my problem. I'll share a link to that change here. This link is good as of 5/21/21 at 12:00 pm: https://github.com/NREL/ditto/commit/c0813ceed8df9ca7faf4dd7b7eb837e7f219c210
I was getting the following error because it couldn't parse out whether my CYME was using IMPERIAL or SI. I hard-coded Imperial to solve the problem:
raise ValueError("Could not find [SI] or [IMPERIAL] unit system information. Unable to parse.")
Once I had DiTTo running, I converted my files but I saw patterns like this:
New Load.Load_org_name999_A_B_C_A_B_C_A_B_C_A_B_C_A_B_C_A_B_C_A_B_C_A_B_C bus1=org_name899.1.2.3.1.2.3.1.2.3.1.2.3.1.2.3.1.2.3.1.2.3.1.2.3 kV=12.47 model=1 kW=330.99999699999984 kvar=0.0 Phases=24
Why is this happening?
I ended up having to change each of these lines using a script so .1.2.3.1.2.3... became .1.2.3 and the Phases became 3. Is this because we have CYME Customer Loads as follows? Is it turning each of these loads into an extra Phase?
A note:
Other questions I had are as follows:
Any insight into how CYME files work would be appreciated.