Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

The DYRENEW() python API is designed in such a way that it assumes you are trying to clear the dynamic working memory in PSS/E and read in new model data (usually starting at the 1st location). From your question it seems that you are trying to append models (CONs) to the existing data in dynamics working memory. If this is the case you might want to take a look at DYREADD() python API. This allows you to specify the default integer (psspy.i) which automatically gives you the last CON in the CON array as described in the DYREADD() functionality.

In short, I do not know of a python API that gives you the current length (or ending index) of the CON array. Based on the limited info in your question, it sounds like what I suggest above should suffice as you shouldn't need to know the ending CON to append data... I took a quick look through the API too, but don't see anything for returning the specific ending CON.

The DYRENEW() DYRE_NEW() python API is designed in such a way that it assumes you are trying to clear the dynamic working memory in PSS/E and read in new model data (usually starting at the 1st location). From your question it seems that you are trying to append models (CONs) to the existing data in dynamics working memory. If this is the case you might want to take a look at DYREADD() DYRE_ADD() python API. This allows you to specify the default integer (psspy.i) (psspy._i) which automatically gives you the last CON in the CON array as described in the DYREADD() DYRE_ADD() functionality.

In short, I do not know of a python API that gives you the current length (or ending index) of the CON array. Based on the limited info in your question, it sounds like what I suggest above should suffice as you shouldn't need to know the ending CON to append data... I took a quick look through the API too, but don't see anything for returning the specific ending CON.

The DYRE_NEW() python API is designed in such a way that it assumes you are trying to clear the dynamic working memory in PSS/E and read in new model data (usually starting at the 1st location). From your question it seems that you are trying to append models (CONs) to the existing data in dynamics working memory. If this is the case you might want to take a look at DYRE_ADD() python API. This allows you to specify the default integer (psspy._i) which automatically gives you the last CON in the CON array as described in the DYRE_ADD() functionality.

In short, I do not know of a python API that gives you the current length (or ending index) of the CON array. Based on the limited info in your question, it sounds like what I suggest above should suffice as you shouldn't need to know the ending CON to append data... I took a quick look through the API too, but don't see anything for returning the specific ending CON.

EDIT: I just looked again in the API... the DLST PSSE function is available in python. Search the PSSE API Manual for DLST. That should give you the exact functionality you are looking for... though I am still not sure that using it in conjunction with dyre_add is what you really want to do.

The DYRE_NEW() python API is designed in such a way that it assumes you are trying to clear the dynamic working memory in PSS/E and read in new model data (usually starting at the 1st location). From your question it seems that you are trying to append models (CONs) to the existing data in dynamics working memory. If this is the case you might want to take a look at DYRE_ADD() python API. This allows you to specify the default integer (psspy._i) which automatically gives you the last CON in the CON array as described in the DYRE_ADD() functionality.

In short, I do not know of a python API that gives you the current length (or ending index) of the CON array. Based on the limited info in your question, it sounds like what I suggest above should suffice as you shouldn't need to know the ending CON to append data... I took a quick look through the API too, but don't see anything for returning the specific ending CON.

EDIT: I just looked again in the API... the DLST PSSE function is available in python. Search the PSSE API Manual for DLST. That should give you the exact functionality you are looking for... though I am still not sure that using it in conjunction with dyre_add dyre_new is what you really want to do.