Created
July 27, 2017 13:22
-
-
Save tshort/a28a6f0ed086450eec3ca336e43d9c6c to your computer and use it in GitHub Desktop.
Storage / CktElement issue in OpenDSSDirect
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
julia> using OpenDSSDirect | |
julia> using OpenDSSDirect.DSS | |
shell> cd C:\\PortableApps\\OpenDSS\\electricdss-git\\Distrib\\IEEETestCases\\13Bus | |
C:\PortableApps\OpenDSS\electricdss-git\Distrib\IEEETestCases\13Bus | |
julia> dss("redirect IEEE13Nodeckt.dss") | |
"" | |
julia> dss("New Storage.611 Bus1=611 phases=1 kV=2.2 kWRated=20 kWhRated=20 kWhStored=20 %IdlingkW=0 %reserve=0 %EffCharge=100 %EffDischarge=100 State=CHARGING") | |
"" | |
julia> dss("New Storage.675 Bus1=675 phases=1 kV=2.2 kWRated=20 kWhRated=20 kWhStored=20 %IdlingkW=0 %reserve=0 %EffCharge=100 %EffDischarge=100 State=CHARGING") | |
"" | |
julia> Circuit.SetActiveClass("Storage") | |
"29" | |
julia> Circuit.SetActiveElement("675") | |
"39" | |
julia> CktElement.AllVariableNames() | |
7-element Array{String,1}: | |
"kWh" | |
"State" | |
"kWOut" | |
"kWIn" | |
"Losses" | |
"Idling" | |
"kWh Chg" | |
julia> DSSCore.CktElementF(4, 1.0) | |
20.0 | |
julia> DSSCore.CktElementF(4, 2.0) | |
0.0 | |
julia> DSSCore.CktElementF(4, 3.0) | |
0.0 | |
julia> DSSCore.CktElementF(4, 4.0) | |
0.0 |
The segfaults go away if I do a Solve first:
Solution.Solve()
DSSCore.CktElementF(4, 5.0) # works
CktElement.AllVariableValues()
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The last crashes with a final argument of 5.0 or 6.0.
Here's a raw script to do the same: