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

Ask Your Question
0

Switching machines via bus number in python script

asked Feb 6 '5

anonymous user

Anonymous

updated Feb 6 '5

Does anyone know if there is a way to remotely switch the machines/generators off within a python script instead of going through the PSSE interface and manually switching off the exact generator? I want to do it systematically by bus number

at this point this is what im using

ierr = psspy.machinechng2(bus_numbers[1], '1', [], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0])

1 answer

Sort by ยป oldest newest most voted
0

answered Feb 6 '5

perolofl gravatar image

The best way to find the API to perform a certain task in PSSE is to:

  1. Start recording of a Python file
  2. Perform the task manually, in this case switch off the generator.
  3. Stop recording and copy relevant parts to your script.

Se also post How to pass only certain elements of an array in function.

In your case the integer array is empty and all reals are set to 0! This is completely wrong.

It should be ierr = psspy.machine_chng_2(bus_numbers[1], '1', [0], []).

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

1 follower

Stats

Asked: Feb 6 '5

Seen: 98 times

Last updated: Feb 06