Ask Your Question
0

Switching machines via bus number in python script

asked 2025-02-05 20:29:21 -0500

anonymous user

Anonymous

updated 2025-02-05 20:54:46 -0500

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])

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2025-02-06 00:32:32 -0500

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], []).

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

1 follower

Stats

Asked: 2025-02-05 20:29:21 -0500

Seen: 192 times

Last updated: Feb 06