Ask Your Question
0

Finding a machine index and changing the array value

asked 2014-03-04 10:46:53 -0600

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

edit retag flag offensive close merge delete

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 ( 2014-03-04 11:55:44 -0600 )edit

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 ( 2014-03-04 15:54:09 -0600 )edit

@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 ( 2014-03-04 16:07:07 -0600 )edit

@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 ( 2014-03-05 09:05:11 -0600 )edit

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

yfwing gravatar imageyfwing ( 2014-03-05 09:54:08 -0600 )edit

2 answers

Sort by ยป oldest newest most voted
0

answered 2014-03-04 11:22:38 -0600

yfwing gravatar image

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

edit flag offensive delete link more
0

answered 2014-03-04 15:29:55 -0600

jconto gravatar image

when using psspy functions, you call a function as:

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

edit flag offensive delete link more

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: 2014-03-04 10:46:53 -0600

Seen: 1,077 times

Last updated: Mar 04 '14