Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Load Information is not Converted from Cyme to OpenDSS #435

Open
yim0331 opened this issue Sep 9, 2024 · 0 comments
Open

Load Information is not Converted from Cyme to OpenDSS #435

yim0331 opened this issue Sep 9, 2024 · 0 comments

Comments

@yim0331
Copy link

yim0331 commented Sep 9, 2024

Hi,

While I testing the Ditto to convert Cyme file to OpenDSS, I found that the Load information isn't converted properly.
In the Ditto code,

### Create load at from node
total_load_from = 0
total_load_from_kvar = 0
for ph in phases:
total_load_from += float(settings['loadfromkw'+ph.lower()])
total_load_from_kvar += float(settings['loadfromkvar'+ph.lower()])
if total_load_from > 0 and total_load_from_kvar > 0:
api_load_from = Load(model)
api_load_from.model=1
api_load_from.connecting_element = self.section_phase_mapping[sectionID][ "fromnodeid" ]
api_load_from.name = sectionID+'_ne_from_load'
# Set the connection index for the from_element (info is in the section)
api_load_from.phase_loads = []
api_load_from.feeder_name = self.section_feeder_mapping[sectionID]
for ph in phases:
try:
api_phase_load_from = PhaseLoad(model)
except:
raise ValueError(
"Unable to instanciate PhaseLoad DiTTo object."
)
try:
api_phase_load_from.phase = ph
except:
pass
try:
api_phase_load_from.p, api_phase_load_from.q = (
10 ** 3 * float(settings['loadfromkw'+ph.lower()]),
10 ** 3 * float(settings['loadfromkvar'+ph.lower()]),
)
except:
pass
# TODO : use load_type_data
api_phase_load_from.ppercentcurrent = 0
api_phase_load_from.qpercentcurrent = 0
api_phase_load_from.ppercentpower = 1
api_phase_load_from.qpercentpower = 1
api_phase_load_from.ppercentimpedance = 0
api_phase_load_from.qpercentimpedance = 0
api_load_from.phase_loads.append(api_phase_load_from)
### Create load at from node
total_load_to = 0
total_load_to_kvar = 0
for ph in phases:
total_load_to += float(settings['loadtokw'+ph.lower()])
total_load_to_kvar += float(settings['loadfromkvar'+ph.lower()])
if total_load_to > 0 and total_load_to_kvar > 0:
api_load_to = Load(model)
api_load_to.model=1
api_load_to.connecting_element = self.section_phase_mapping[sectionID][ "tonodeid" ]
api_load_to.name = sectionID+'_ne_to_load'
# Set the connection index for the from_element (info is in the section)
api_load_to.phase_loads = []
api_load_to.feeder_name = self.section_feeder_mapping[sectionID]
for ph in phases:
try:
api_phase_load_to = PhaseLoad(model)
except:
raise ValueError(
"Unable to instanciate PhaseLoad DiTTo object."
)
try:
api_phase_load_to.phase = ph
except:
pass
try:
api_phase_load_to.p, api_phase_load_to.q = (
10 ** 3 * float(settings['loadtokw'+ph.lower()]),
10 ** 3 * float(settings['loadtokvar'+ph.lower()]),
)
except:
pass
# TODO : use load_type_data
api_phase_load_to.ppercentcurrent = 0
api_phase_load_to.qpercentcurrent = 0
api_phase_load_to.ppercentpower = 1
api_phase_load_to.qpercentpower = 1
api_phase_load_to.ppercentimpedance = 0
api_phase_load_to.qpercentimpedance = 0
api_load_to.phase_loads.append(api_phase_load_to)
, there were the comments that indicate it's in TODO list.
Could you advise me when the conversion code will be implemented?

Tganks,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant