First time here? We are a friendly community of Power Systems Engineers. Check out the FAQ!
1 | initial version |
I generate a report when I run my ASCC analysis, the report always has the contributions listed for me.
Are you running these manually or through the API?
If you're using the API this may help you find a way to implement it:
def __ASCC(self, out_file_identifier, out_file_path, subsystem, gen_scfiles=False):
"""
:param out_file_identifier: increments file names
:param out_file_path: gives folder to place reports in
:param subsystem: specifies subsystem id for psspy.ascc api
:param gen_scfiles: option flag for scfile output of psspy.ascc api
:return:
"""
if not os.path.isfile(os.path.join(out_file_path, '%d_ASCC_rawData.txt' % out_file_identifier)):
self.log('Running ASCC for segment %d' % out_file_identifier)
ierr = self.psspy.report_output(2, os.path.join(out_file_path, '%d_ASCC_rawData.txt' % out_file_identifier))
if ierr: self.log('Error on ASCC reporting for segment %s ierr %s' % (out_file_identifier, ierr), 'error')
# class fault analysis conditions
# ierr = self.psspy.flat_2([1, 1, 1, 2, 1, 2, 1, 3], [1, 1])
if gen_scfiles:
if not os.path.exists(os.path.join(out_file_path, 'scfiles')):
os.makedirs(os.path.join(out_file_path, 'scfiles'))
scfile_path = os.path.join(out_file_path, 'scfiles', '%d_scfile.sc' % out_file_identifier)
else:
scfile_path = ""
# this flats the case and stuff
ierr = self.psspy.ascc_3(subsystem, 0, [1, 1, 0, 1, 0, 2, 0, 1, 0, 1, 1, 0, 0, 2, 2, 1, 1], [1],
'', '', scfile_path)
if ierr: self.log('Error on ASCC segment %s ierr %s', 'error')
else:
self.log('skipping %d_ASCC_rawData.txt' % out_file_identifier)