Ask Your Question

Revision history [back]

Make each substation its own script. Then run a python script to run python scripts. This is the example code for one 'large' substation.

Substation Information

psspy.stationdata(10000,[f,f,f],r"""CRAIG""")

345 kV Nodes 10000 Bus

psspy.stationnodedata(10000,101,[10000,i],s) psspy.stationnodedata(10000,102,[10000,i],s) psspy.stationnodedata(10000,111,[10000,i],s) psspy.stationnodedata(10000,112,[10000,i],s) psspy.stationnodedata(10000,113,[10000,i],s) psspy.stationnodedata(10000,114,[10000,i],s) psspy.stationnodedata(10000,115,[10000,i],s) psspy.stationnodedata(10000,116,[10000,i],s)

230 kV Nodes 10001 Bus

psspy.stationnodedata(10000,201,[10001,i],s) psspy.stationnodedata(10000,202,[10001,i],s) psspy.stationnodedata(10000,211,[10001,i],s) psspy.stationnodedata(10000,212,[10001,i],s) psspy.stationnodedata(10000,213,[10001,i],s) psspy.stationnodedata(10000,214,[10001,i],s) psspy.stationnodedata(10000,215,[10001,i],s) psspy.stationnodedata(10000,216,[10001,i],s) psspy.stationnodedata(10000,217,[10001,i],s) psspy.stationnodedata(10000,218,[10001,i],s)

345 kV Switching Devices

psspy.stationswddata(10000,101,111,r"""1""",[i,i,2],[f,f,f,f],r"""192""") psspy.stationswddata(10000,101,113,r"""1""",[i,i,2],[f,f,f,f],r"""496""") psspy.stationswddata(10000,101,115,r"""1""",[i,i,2],[f,f,f,f],r"""792""") psspy.stationswddata(10000,111,112,r"""1""",[i,i,2],[f,f,f,f],r"""296""") psspy.stationswddata(10000,113,114,r"""1""",[i,i,2],[f,f,f,f],r"""596""") psspy.stationswddata(10000,115,116,r"""1""",[i,i,2],[f,f,f,f],r"""896""") psspy.stationswddata(10000,112,102,r"""1""",[i,i,2],[f,f,f,f],r"""392""") psspy.stationswddata(10000,114,102,r"""1""",[i,i,2],[f,f,f,f],r"""692""") psspy.stationswddata(10000,116,102,r"""1""",[i,i,2],[f,f,f,f],r"""992""")

230 kV Switching Devices

psspy.stationswddata(10000,201,211,r"""1""",[i,i,2],[f,f,f,f],r"""182""") psspy.stationswddata(10000,201,213,r"""1""",[i,i,2],[f,f,f,f],r"""486""") psspy.stationswddata(10000,201,215,r"""1""",[i,i,2],[f,f,f,f],r"""782""") psspy.stationswddata(10000,201,217,r"""1""",[i,i,2],[f,f,f,f],r"""1082""") psspy.stationswddata(10000,211,212,r"""1""",[i,i,2],[f,f,f,f],r"""286""") psspy.stationswddata(10000,213,214,r"""1""",[i,i,2],[f,f,f,f],r"""586""") psspy.stationswddata(10000,215,216,r"""1""",[i,i,2],[f,f,f,f],r"""886""") psspy.stationswddata(10000,217,218,r"""1""",[i,i,2],[f,f,f,f],r"""1186""") psspy.stationswddata(10000,212,202,r"""1""",[i,i,2],[f,f,f,f],r"""382""") psspy.stationswddata(10000,214,202,r"""1""",[i,i,2],[f,f,f,f],r"""682""") psspy.stationswddata(10000,216,202,r"""1""",[i,i,2],[f,f,f,f],r"""982""") psspy.stationswddata(10000,218,202,r"""1""",[i,i,2],[f,f,f,f],r"""1282""")

345 kV Lines and Transformers

SUB1-SUB2 345

psspy.stationbranchterm_move(10002,10000,r"""1""",116)

SUB1-SUB3 345

psspy.stationbranchterm_move(10003,10000,r"""1""",112)

SUB1-SUB4 345

psspy.stationbranchterm_move(10004,10000,r"""1""",115)

SUB1 T3 XFMR

psspy.stationbranchterm_move(10005,10000,r"""1""",114)

230 kV Lines and Transformers

SUB1 345/230 XFMR 1

psspy.stationbranchtermmove(10001,10000,r"""1""",111) psspy.stationbranchtermmove(10000,10001,r"""1""",211)

SUB1 345/230 XFMR 2

psspy.stationbranchtermmove(10001,10000,r"""2""",113) psspy.stationbranchtermmove(10000,10001,r"""2""",213)

SUB1 1 XFMR

psspy.stationbranchterm_move(10006,10001,r"""1""",217)

SUB1 2 XFMR

psspy.stationbranchterm_move(10007,10001,r"""1""",214)

SUB1-SUB5 230

psspy.stationbranchterm_move(10008,10001,r"""1""",212)

SUB1-SUB6 230

psspy.stationbranchterm_move(10009,10001,r"""2""",215)

SUB1-SUB7 230

psspy.stationbranchterm_move(10010,10001,r"""1""",216)

SUB1-SUB7 230

psspy.stationbranchterm_move(10011,10001,r"""1""",218)

230 kV Load

psspy.stationloadterm_chng(10001,r"""1""",202)

Make each substation its own script. Then run a python script to run python scripts. This is the example code for one 'large' substation.

Substation Information

psspy.stationdata(10000,[f,f,f],r"""CRAIG""")

345 kV Nodes 10000 Bus

psspy.stationnodedata(10000,101,[10000,i],s) psspy.stationnodedata(10000,102,[10000,i],s) psspy.stationnodedata(10000,111,[10000,i],s) psspy.stationnodedata(10000,112,[10000,i],s) psspy.stationnodedata(10000,113,[10000,i],s) psspy.stationnodedata(10000,114,[10000,i],s) psspy.stationnodedata(10000,115,[10000,i],s) psspy.stationnodedata(10000,116,[10000,i],s)

230 kV Nodes 10001 Bus

psspy.stationnodedata(10000,201,[10001,i],s) psspy.stationnodedata(10000,202,[10001,i],s) psspy.stationnodedata(10000,211,[10001,i],s) psspy.stationnodedata(10000,212,[10001,i],s) psspy.stationnodedata(10000,213,[10001,i],s) psspy.stationnodedata(10000,214,[10001,i],s) psspy.stationnodedata(10000,215,[10001,i],s) psspy.stationnodedata(10000,216,[10001,i],s) psspy.stationnodedata(10000,217,[10001,i],s) psspy.stationnodedata(10000,218,[10001,i],s)

345 kV Switching Devices

psspy.stationswddata(10000,101,111,r"""1""",[i,i,2],[f,f,f,f],r"""192""") psspy.stationswddata(10000,101,113,r"""1""",[i,i,2],[f,f,f,f],r"""496""") psspy.stationswddata(10000,101,115,r"""1""",[i,i,2],[f,f,f,f],r"""792""") psspy.stationswddata(10000,111,112,r"""1""",[i,i,2],[f,f,f,f],r"""296""") psspy.stationswddata(10000,113,114,r"""1""",[i,i,2],[f,f,f,f],r"""596""") psspy.stationswddata(10000,115,116,r"""1""",[i,i,2],[f,f,f,f],r"""896""") psspy.stationswddata(10000,112,102,r"""1""",[i,i,2],[f,f,f,f],r"""392""") psspy.stationswddata(10000,114,102,r"""1""",[i,i,2],[f,f,f,f],r"""692""") psspy.stationswddata(10000,116,102,r"""1""",[i,i,2],[f,f,f,f],r"""992""")

230 kV Switching Devices

psspy.stationswddata(10000,201,211,r"""1""",[i,i,2],[f,f,f,f],r"""182""") psspy.stationswddata(10000,201,213,r"""1""",[i,i,2],[f,f,f,f],r"""486""") psspy.stationswddata(10000,201,215,r"""1""",[i,i,2],[f,f,f,f],r"""782""") psspy.stationswddata(10000,201,217,r"""1""",[i,i,2],[f,f,f,f],r"""1082""") psspy.stationswddata(10000,211,212,r"""1""",[i,i,2],[f,f,f,f],r"""286""") psspy.stationswddata(10000,213,214,r"""1""",[i,i,2],[f,f,f,f],r"""586""") psspy.stationswddata(10000,215,216,r"""1""",[i,i,2],[f,f,f,f],r"""886""") psspy.stationswddata(10000,217,218,r"""1""",[i,i,2],[f,f,f,f],r"""1186""") psspy.stationswddata(10000,212,202,r"""1""",[i,i,2],[f,f,f,f],r"""382""") psspy.stationswddata(10000,214,202,r"""1""",[i,i,2],[f,f,f,f],r"""682""") psspy.stationswddata(10000,216,202,r"""1""",[i,i,2],[f,f,f,f],r"""982""") psspy.stationswddata(10000,218,202,r"""1""",[i,i,2],[f,f,f,f],r"""1282""")

345 kV Lines and Transformers

SUB1-SUB2 345

psspy.stationbranchterm_move(10002,10000,r"""1""",116)

SUB1-SUB3 345

psspy.stationbranchterm_move(10003,10000,r"""1""",112)

SUB1-SUB4 345

psspy.stationbranchterm_move(10004,10000,r"""1""",115)

SUB1 T3 XFMR

psspy.stationbranchterm_move(10005,10000,r"""1""",114)

230 kV Lines and Transformers

SUB1 345/230 XFMR 1

psspy.stationbranchtermmove(10001,10000,r"""1""",111) psspy.stationbranchtermmove(10000,10001,r"""1""",211)

SUB1 345/230 XFMR 2

psspy.stationbranchtermmove(10001,10000,r"""2""",113) psspy.stationbranchtermmove(10000,10001,r"""2""",213)

SUB1 1 XFMR

psspy.stationbranchterm_move(10006,10001,r"""1""",217)

SUB1 2 XFMR

psspy.stationbranchterm_move(10007,10001,r"""1""",214)

SUB1-SUB5 230

psspy.stationbranchterm_move(10008,10001,r"""1""",212)

SUB1-SUB6 230

psspy.stationbranchterm_move(10009,10001,r"""2""",215)

SUB1-SUB7 230

psspy.stationbranchterm_move(10010,10001,r"""1""",216)

SUB1-SUB7 230

psspy.stationbranchterm_move(10011,10001,r"""1""",218)

230 kV Load

psspy.stationloadterm_chng(10001,r"""1""",202)

Make each substation its own script. Then run a python script to run python scripts. This is the example code for one 'large' substation.

Substation Information

psspy.stationdata(10000,[f,f,f],r"""CRAIG""")f],r"""SUB""")

345 kV Nodes 10000 Bus

psspy.stationnodedata(10000,101,[10000,i],s) psspy.stationnodedata(10000,102,[10000,i],s) psspy.stationnodedata(10000,111,[10000,i],s) psspy.stationnodedata(10000,112,[10000,i],s) psspy.stationnodedata(10000,113,[10000,i],s) psspy.stationnodedata(10000,114,[10000,i],s) psspy.stationnodedata(10000,115,[10000,i],s) psspy.stationnodedata(10000,116,[10000,i],s)

230 kV Nodes 10001 Bus

psspy.stationnodedata(10000,201,[10001,i],s) psspy.stationnodedata(10000,202,[10001,i],s) psspy.stationnodedata(10000,211,[10001,i],s) psspy.stationnodedata(10000,212,[10001,i],s) psspy.stationnodedata(10000,213,[10001,i],s) psspy.stationnodedata(10000,214,[10001,i],s) psspy.stationnodedata(10000,215,[10001,i],s) psspy.stationnodedata(10000,216,[10001,i],s) psspy.stationnodedata(10000,217,[10001,i],s) psspy.stationnodedata(10000,218,[10001,i],s)

345 kV Switching Devices

psspy.stationswddata(10000,101,111,r"""1""",[i,i,2],[f,f,f,f],r"""192""") psspy.stationswddata(10000,101,113,r"""1""",[i,i,2],[f,f,f,f],r"""496""") psspy.stationswddata(10000,101,115,r"""1""",[i,i,2],[f,f,f,f],r"""792""") psspy.stationswddata(10000,111,112,r"""1""",[i,i,2],[f,f,f,f],r"""296""") psspy.stationswddata(10000,113,114,r"""1""",[i,i,2],[f,f,f,f],r"""596""") psspy.stationswddata(10000,115,116,r"""1""",[i,i,2],[f,f,f,f],r"""896""") psspy.stationswddata(10000,112,102,r"""1""",[i,i,2],[f,f,f,f],r"""392""") psspy.stationswddata(10000,114,102,r"""1""",[i,i,2],[f,f,f,f],r"""692""") psspy.stationswddata(10000,116,102,r"""1""",[i,i,2],[f,f,f,f],r"""992""")

230 kV Switching Devices

psspy.stationswddata(10000,201,211,r"""1""",[i,i,2],[f,f,f,f],r"""182""") psspy.stationswddata(10000,201,213,r"""1""",[i,i,2],[f,f,f,f],r"""486""") psspy.stationswddata(10000,201,215,r"""1""",[i,i,2],[f,f,f,f],r"""782""") psspy.stationswddata(10000,201,217,r"""1""",[i,i,2],[f,f,f,f],r"""1082""") psspy.stationswddata(10000,211,212,r"""1""",[i,i,2],[f,f,f,f],r"""286""") psspy.stationswddata(10000,213,214,r"""1""",[i,i,2],[f,f,f,f],r"""586""") psspy.stationswddata(10000,215,216,r"""1""",[i,i,2],[f,f,f,f],r"""886""") psspy.stationswddata(10000,217,218,r"""1""",[i,i,2],[f,f,f,f],r"""1186""") psspy.stationswddata(10000,212,202,r"""1""",[i,i,2],[f,f,f,f],r"""382""") psspy.stationswddata(10000,214,202,r"""1""",[i,i,2],[f,f,f,f],r"""682""") psspy.stationswddata(10000,216,202,r"""1""",[i,i,2],[f,f,f,f],r"""982""") psspy.stationswddata(10000,218,202,r"""1""",[i,i,2],[f,f,f,f],r"""1282""")

345 kV Lines and Transformers

SUB1-SUB2 345

psspy.stationbranchterm_move(10002,10000,r"""1""",116)

SUB1-SUB3 345

psspy.stationbranchterm_move(10003,10000,r"""1""",112)

SUB1-SUB4 345

psspy.stationbranchterm_move(10004,10000,r"""1""",115)

SUB1 T3 XFMR

psspy.stationbranchterm_move(10005,10000,r"""1""",114)

230 kV Lines and Transformers

SUB1 345/230 XFMR 1

psspy.stationbranchtermmove(10001,10000,r"""1""",111) psspy.stationbranchtermmove(10000,10001,r"""1""",211)

SUB1 345/230 XFMR 2

psspy.stationbranchtermmove(10001,10000,r"""2""",113) psspy.stationbranchtermmove(10000,10001,r"""2""",213)

SUB1 1 XFMR

psspy.stationbranchterm_move(10006,10001,r"""1""",217)

SUB1 2 XFMR

psspy.stationbranchterm_move(10007,10001,r"""1""",214)

SUB1-SUB5 230

psspy.stationbranchterm_move(10008,10001,r"""1""",212)

SUB1-SUB6 230

psspy.stationbranchterm_move(10009,10001,r"""2""",215)

SUB1-SUB7 230

psspy.stationbranchterm_move(10010,10001,r"""1""",216)

SUB1-SUB7 230

psspy.stationbranchterm_move(10011,10001,r"""1""",218)

230 kV Load

psspy.stationloadterm_chng(10001,r"""1""",202)