Ask Your Question
0

How to transform a branch from in-service to out-serive using Python

asked 2017-02-13 10:17:42 -0500

Richard gravatar image

I would like to transform a branch form in-service to out-service using Python.

It is not mean to remove the branch.

So, I tried to do that using following code and then saved the result.

psspy.branchchng(Fromnum , To_num , ID ,intgar1=0)

But, I got a raw file to reomve the branch

Could you inform me the solution?

edit retag flag offensive close merge delete

2 answers

Sort by ยป oldest newest most voted
1

answered 2017-02-15 08:39:06 -0500

Power_System_Engineer gravatar image

If I understands your question correctly, assuming you want to use the PSSE API python method to take a branch out of service in the powerflow model.

Here's the standard python syntax per PSSE_API document - i = frombus, j = tobus, ckt = circuit id, intgar is an array of 6 elements, so using the keyword function, intgar1 is where the branch status can be set from 1 to 0 where 1 = in service.

psspy.branchdata3( i=12345,j=34567,ckt = '1',intgar1 = 0)

edit flag offensive delete link more
0

answered 2017-02-16 00:55:20 -0500

perolofl gravatar image

It is better to use branchchng since that API will only act on existing branches. API branchdata_3 will add a branch if the branch does not exist. It is not necessary to give the keywords since all needed argument are in the correct order, i.e.

psspy.branch_chng(12345,34567,'1',0)
edit flag offensive delete link more

Comments

agreed -the keyword function is just my personal preference - I tend to forget what those values represent after a period of time.

Power_System_Engineer gravatar imagePower_System_Engineer ( 2017-02-16 08:14:20 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

[hide preview]

Question Tools

Stats

Asked: 2017-02-13 10:17:42 -0500

Seen: 1,141 times

Last updated: Feb 16 '17