Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Change some (not all) branch data using branch_chng

I have an application that produces a list of branches and their dynamic ratings based on temperature (eg: from bus, to bus, ckt ID's, and NEW RATING) from which I want to modify only the ratings of branches, leaving all other data like ownership and impedance unchanged.

When I do this in the PSSE GUI recording to a python script I get something like: psspy.branch_chng(frombus#,tobus#,r"""cktID""",[_i,_i,_i,_i,_i,_i],[_f,_f,_f, newRatingAfloat, newRatingBfloat, newRatingCfloat,_f,_f,_f,_f,_f,_f,_f,_f,_f])

When I integrate the command in my python application, though, I can't pass the default values "i" and "f" to the command. API documentation indicates that the user is responsible for providing values for these defaults. If I pass a blank list for INTGAR and blank floats to the non-rating REALAR lists like this:

psspy.branch_chng(int(fromBus#),int(toBus#),str(cktID),[],[float(),float(),float(),float(RATINGA),float(RATINGB),float(RATINGC),float(),float(),float(),float(),float(),float(),float(),float(),float()])

PSS\E thinks I want to change these blank float() values back to their defaults, which eliminates the already-defined impedance data. The ownership data (INTGAR, which above is called with a blank list []) remains unchanged. The API expects two lists when calling branch_chng. It will accept a list with nothing in it, but won't accept a list with elements that have NoneType values if it expects float or int. For example, this returns a Type error:

psspy.branch_chng(int(fromBus#),int(toBus#),str(cktID),[],[None,None,None,float(RATINGA),float(RATINGB),float(RATINGC),None,None,None,None,None,None,None,None,None])

My question is: Do I have to call the API command BRNDAT to get the REALAR values that I don't want to change, or is there a way to call branch_chng without supplying or overwriting the data I don't want to change?

Change some (not all) branch data using branch_chng

I have an application that produces a list of branches and their dynamic ratings based on temperature (eg: from bus, to bus, ckt ID's, and NEW RATING) from which I want to modify only the ratings of branches, leaving all other data like ownership and impedance unchanged.

When I do this in the PSSE GUI recording to a python script I get something like: psspy.branch_chng(frombus#,tobus#,r"""cktID""",[_i,_i,_i,_i,_i,_i],[_f,_f,_f, newRatingAfloat, newRatingBfloat, newRatingCfloat,_f,_f,_f,_f,_f,_f,_f,_f,_f])

When I integrate the command in my python application, though, I can't pass the default values "i" and "f" to the command. API documentation indicates that the user is responsible for providing values for these defaults. If I pass a blank list for INTGAR and blank floats to the non-rating REALAR lists like this:

psspy.branch_chng(int(fromBus#),int(toBus#),str(cktID),[],[float(),float(),float(),float(RATINGA),float(RATINGB),float(RATINGC),float(),float(),float(),float(),float(),float(),float(),float(),float()])

PSS\E thinks I want to change these blank float() values back to their defaults, which eliminates the already-defined impedance data. The ownership data (INTGAR, which above is called with a blank list []) remains unchanged. The API expects two lists when calling branch_chng. It will accept a list with nothing in it, but won't accept a list with elements that have NoneType values if it expects float or int. For example, this returns a Type error:

psspy.branch_chng(int(fromBus#),int(toBus#),str(cktID),[],[None,None,None,float(RATINGA),float(RATINGB),float(RATINGC),None,None,None,None,None,None,None,None,None])

My question is: Do I have to call the API command BRNDAT to get the REALAR values that I don't want to change, or is there a way to call branch_chng without supplying or overwriting the data I don't want to change?

Change some (not all) branch data using branch_chng

I have an application that produces a list of branches and their dynamic ratings based on temperature (eg: from bus, to bus, ckt ID's, and NEW RATING) from which I want to modify only the ratings of branches, leaving all other data like ownership and impedance unchanged.

When I do this in the PSSE GUI recording to a python script I get something like: like:

psspy.branch_chng(frombus#,tobus#,r"""cktID""",[_i,_i,_i,_i,_i,_i],[_f,_f,_f, newRatingAfloat, newRatingBfloat, newRatingCfloat,_f,_f,_f,_f,_f,_f,_f,_f,_f])

newRatingAfloat,newRatingBfloat,newRatingCfloat,_f,_f,_f,_f,_f,_f,_f,_f,_f])

When I integrate the command in my python application, though, I can't pass the default values "i" and "f" to the command. API documentation indicates that the user is responsible for providing values for these defaults. If I pass a blank list for INTGAR and blank floats to the non-rating REALAR lists like this:

psspy.branch_chng(int(fromBus#),int(toBus#),str(cktID),[],[float(),float(),float(),float(RATINGA),float(RATINGB),float(RATINGC),float(),float(),float(),float(),float(),float(),float(),float(),float()])

psspy.branch_chng(int(fromBus#),int(toBus#),str(cktID),[],[float(),float(),float(),float(RATINGA),float(RATINGB),float(RATINGC),float(),float(),float(),float(),float(),float(),float(),float(),float()])

PSS\E thinks I want to change these blank float() values back to their defaults, which eliminates the already-defined impedance data. The ownership data (INTGAR, which above is called with a blank list []) remains unchanged. The API expects two lists when calling branch_chng. It will accept a list with nothing in it, but won't accept a list with elements that have NoneType values if it expects float or int. For example, this returns a Type error:

psspy.branch_chng(int(fromBus#),int(toBus#),str(cktID),[],[None,None,None,float(RATINGA),float(RATINGB),float(RATINGC),None,None,None,None,None,None,None,None,None])

psspy.branch_chng(int(fromBus#),int(toBus#),str(cktID),[],[None,None,None,float(RATINGA),float(RATINGB),float(RATINGC),None,None,None,None,None,None,None,None,None])

My question is: Do I have to call the API command BRNDAT to get the REALAR values that I don't want to change, or is there a way to call branch_chng without supplying or overwriting the data I don't want to change?

Change some (not all) branch data using branch_chng

I have an application that produces a list of branches and their dynamic ratings based on temperature (eg: from bus, to bus, ckt ID's, and NEW RATING) from which I want to modify only the ratings of branches, leaving all other data like ownership and impedance unchanged.

When I do this in the PSSE GUI recording to a python script I get something like:

psspy.branch_chng(frombus#,tobus#,r"""cktID""",[_i,_i,_i,_i,_i,_i],[_f,_f,_f, psspy.branch_chng(frombusNum,tobusNum,r"""cktID""",[_i,_i,_i,_i,_i,_i],[_f,_f,_f, newRatingAfloat,newRatingBfloat,newRatingCfloat,_f,_f,_f,_f,_f,_f,_f,_f,_f])

When I integrate the command in my python application, though, I can't pass the default values "i" and "f" to the command. API documentation indicates that the user is responsible for providing values for these defaults. If I pass a blank list for INTGAR and blank floats to the non-rating REALAR lists like this:

psspy.branch_chng(int(fromBus#),int(toBus#),str(cktID),[],[float(),float(),float(),float(RATINGA),float(RATINGB),float(RATINGC),float(),float(),float(),float(),float(),float(),float(),float(),float()])

PSS\E thinks I want to change these blank float() values back to their defaults, which eliminates the already-defined impedance data. The ownership data (INTGAR, which above is called with a blank list []) remains unchanged. The API expects two lists when calling branch_chng. It will accept a list with nothing in it, but won't accept a list with elements that have NoneType values if it expects float or int. For example, this returns a Type error:

psspy.branch_chng(int(fromBus#),int(toBus#),str(cktID),[],[None,None,None,float(RATINGA),float(RATINGB),float(RATINGC),None,None,None,None,None,None,None,None,None])
psspy.branch_chng(int(fromBusNum),int(toBusNum),str(cktID),[],[None,None,None,float(RATINGA),float(RATINGB),float(RATINGC),None,None,None,None,None,None,None,None,None])

My question is: Do I have to call the API command BRNDAT to get the REALAR values that I don't want to change, or is there a way to call branch_chng without supplying or overwriting the data I don't want to change?

Change some (not all) branch data using branch_chng

I have an application that produces a list of branches and their dynamic ratings based on temperature (eg: from bus, to bus, ckt ID's, and NEW RATING) from which I want to modify only the ratings of branches, leaving all other data like ownership and impedance unchanged.

When I do this in the PSSE GUI recording to a python script I get something like:

psspy.branch_chng(frombusNum,tobusNum,r"""cktID""",[_i,_i,_i,_i,_i,_i],[_f,_f,_f, newRatingAfloat,newRatingBfloat,newRatingCfloat,_f,_f,_f,_f,_f,_f,_f,_f,_f])

When I integrate the command in my python application, though, I can't pass the default values "i" and "f" to the command. API documentation indicates that the user is responsible for providing values for these defaults. If I pass a blank list for INTGAR and blank floats to the non-rating REALAR lists like this:

psspy.branch_chng(int(fromBus#),int(toBus#),str(cktID),[],[float(),float(),float(),float(RATINGA),float(RATINGB),float(RATINGC),float(),float(),float(),float(),float(),float(),float(),float(),float()])
psspy.branch_chng(int(fromBusNum),int(toBusNum),str(cktID),[],[float(),float(),float(),float(RATINGA),float(RATINGB),float(RATINGC),float(),float(),float(),float(),float(),float(),float(),float(),float()])

PSS\E thinks I want to change these blank float() values back to their defaults, which eliminates the already-defined impedance data. The ownership data (INTGAR, which above is called with a blank list []) remains unchanged. The API expects two lists when calling branch_chng. It will accept a list with nothing in it, but won't accept a list with elements that have NoneType values if it expects float or int. For example, this returns a Type error:

psspy.branch_chng(int(fromBusNum),int(toBusNum),str(cktID),[],[None,None,None,float(RATINGA),float(RATINGB),float(RATINGC),None,None,None,None,None,None,None,None,None])

My question is: Do I have to call the API command BRNDAT to get the REALAR values that I don't want to change, or is there a way to call branch_chng without supplying or overwriting the data I don't want to change?