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

Ask Your Question
0

Finding a machine index and changing the array value

asked Mar 4 '14

Diz gravatar image

Hello everyone, I am trying to find a wind machine index number and change the WPCMND and WQCMND array values for that wind machine. I am new to python, can anybody explain how to find the index number and change the array values using python? Thanks Diz

Comments

yfwing, Appreciate your quick response. I tried using the below syntax on the command line input ierr,ival=windmind(104,1,WGEN,VAR),but I am seeing the following error Traceback (most recent call last): File "<string>", line 1, in <module> NameError: name 'windmind' not defined.

Diz gravatar imageDiz (Mar 4 '14)

jconto, thanks for joining on the issue. I tried using the syntax ierr,ival= psspy.windmind(104,1,WGEN,VAR) and there still is error poping up. It says invalid syntax.

Diz gravatar imageDiz (Mar 4 '14)

@Diz, you need use single quote to WGEN and VAR. i.e., the syntax should be: ierr,ival= psspy.windmind(104,1,'WGEN','VAR').

yfwing gravatar imageyfwing (Mar 4 '14)

@yfwing, No luck yet. Actually I tried using quote too. Below is what I tried ierr,ival= psspy.windmind(104,1,'WGEN','VAR') ^ SyntaxError: invalid syntax Python Exception raised! Any suggestions why I am getting this error. Thanks

Diz gravatar imageDiz (Mar 5 '14)

@Diz, Sorry, it should be ierr,ival= psspy.windmind(104,'1','WGEN','VAR'). the machine ID should be Character as well.

yfwing gravatar imageyfwing (Mar 5 '14)

2 answers

Sort by » oldest newest most voted
0

answered Mar 4 '14

yfwing gravatar image

You can call the function psspy.windmind(ibus, id, string1, string2) to get the model index number.

link
0

answered Mar 4 '14

jconto gravatar image

when using psspy functions, you call a function as:

ierr,ival= psspy.windmind(104,1,WGEN,VAR)

link

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.
Want to format code in your answer? Here is a one minute demo on Youtube

Add Answer

[hide preview]

Question Tools

Stats

Asked: Mar 4 '14

Seen: 1,094 times

Last updated: Mar 04 '14