First time here? We are a friendly community of Power Systems Engineers. Check out the FAQ!

Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

asked Aug 30 '1

likethevegetable gravatar image

Getting current time in dynamics simulation?

Is there a Python API to get the current time in the dynamics simulation? Perhaps 'time' exists as a CON in the simulation, and I could retrieve that?

click to hide/show revision 2
No.2 Revision

Getting current time in dynamics simulation?

Is there a Python API to get the current time in the dynamics simulation? Perhaps 'time' exists as a CON STATE in the simulation, and I could retrieve that?

EDIT: I believe this would work

ierr = psspy.dlst(5, 5, 0, 0) # 5=0ut

click to hide/show revision 3
No.3 Revision

Getting current time in dynamics simulation?

Is there a Python API to get the current time in the dynamics simulation? Perhaps 'time' exists as a STATE in the simulation, and I could retrieve that?that? I know it exists in the OUT file.

EDIT: I believe figured this would workwork, but this function only returns IERR.

ierr = psspy.dlst(5, 5, 0, 0) # 5=0ut

click to hide/show revision 4
No.4 Revision

Getting current time in dynamics simulation?

Is there a Python API to get the current time in the dynamics simulation? Perhaps 'time' exists as a STATE in the simulation, and I could retrieve that? I know it exists in the OUT file.

I figured this would work, but this function only returns IERR.

ierr = psspy.dlst(5, 5, 0, 0) # 5=0ut

EDIT: Perhaps I need to access the current out file in the case and get the last element in the time array.

click to hide/show revision 5
No.5 Revision

Getting current time in dynamics simulation?

Is there a Python API to get the current time in the dynamics simulation? Perhaps 'time' exists as a STATE in the simulation, and I could retrieve that? I know it exists in the OUT file.

I figured this would work, but this function only returns IERR.

ierr = psspy.dlst(5, 5, 0, 0) # 5=0ut

EDIT: Perhaps I need to access the current out file in the case and get the last element in the time array.array. I could definitely attempt this by loading dyntools, but I'm still wondering if I can do this through psspy more elegantly.