First time here? We are a friendly community of Power Systems Engineers. Check out the FAQ!
1 | initial version |
Hello everyone, I want to build a small system with BESS, and change the active power output from BESS by adding Paux in the REECCU model then test the dynamic simulation, so I have tried the model "BESSjconto20230613" in the post "Example .dyr data for BESS" provide by jconto, so I have some question at this moment as bellow:
import "SMIB_BESS.py"
, the error is as follow:Traceback (most recent call last):
File "<string>", line 1, in <module>
File "SMIB_BESS.py", line 9, in <module>
_i = psspy.getdefaultint()
NameError: name 'psspy' is not defined
Even after import os, sys
will get the same error, but _i = psspy.getdefaultint()
meams it did read the script, right? And psspy is no need to import through GUI, so I am confused.
(My PSS/E is v.34)
2.Will it be better to do it by python, not through GUI, if I want to change Paux constantly in VAR(L) of REECCU model
I am new to PSS/E and python, but any suggestion will be much appreciate!
2 | No.2 Revision |
Hello everyone, I want to build a small system with BESS, and change the active power output from BESS by adding Paux in the REECCU model then test the dynamic simulation, so I have tried the model "BESSjconto20230613" in the post "Example .dyr data for BESS" provide by jconto, so I have some question at this moment as bellow:
import "SMIB_BESS.py"
, the error is as follow:Traceback (most recent call last):
File "<string>", line 1, in <module>
File "SMIB_BESS.py", line 9, in <module>
_i = psspy.getdefaultint()
NameError: name 'psspy' is not defined
Even after import os, sys
will get the same error, but _i = psspy.getdefaultint()
meams means it did read the script, right? And psspy is no need to import through GUI, so I am confused.
(My PSS/E is v.34)
2.Will it be better to do it by python, not through GUI, if I want to change Paux constantly in VAR(L) of REECCU model
I am new to PSS/E and python, but any suggestion will be much appreciate!
3 | No.3 Revision |
Hello everyone, I want to build a small system with BESS, and change the active power output from BESS by adding Paux in the REECCU model then test the dynamic simulation, so I have tried the model "BESSjconto20230613" in the post "Example .dyr data for BESS" provide by jconto, so I have some question at this moment as bellow:
import "SMIB_BESS.py"
, the error is as follow:Traceback (most recent call last):
File "<string>", line 1, in <module>
File "SMIB_BESS.py", line 9, in <module>
_i = psspy.getdefaultint()
NameError: name 'psspy' is not defined
Even after import os, sys
will get the same error, but _i = psspy.getdefaultint()
means it did read the script, right? And psspy is no need to import through GUI, so I am confused.
(My PSS/E is v.34)
My print sys.path :
['', 'C:\\Program Files (x86)\\PTI\\PSSE34\\PSSPYTHON27', 'C:\\Program Files (x86)\\PTI\\PSSE34\\PSSPY27', 'C:\\WINDOWS\\SYSTEM32\\python27.zip', 'C:\\Python27\\Lib', 'C:\\Python27\\DLLs', 'C:\\Python27\\Lib\\lib-tk', 'C:\\Users\\POWER\\Documents\\PTI\\PSSE34', 'C:\\Program Files (x86)\\PTI\\PSSE34\\PSSBIN', 'C:\\Python27', 'C:\\Python27\\lib\\site-packages', 'C:\\Python27\\lib\\site-packages\\psse_env_manager', 'C:\\Python27\\lib\\site-packages\\win32', 'C:\\Python27\\lib\\site-packages\\win32\\lib', 'C:\\Python27\\lib\\site-packages\\Pythonwin', 'C:\\Python27\\lib\\site-packages\\wx-3.0-msw']
2.Will it be better to do it by python, not through GUI, if I want to change Paux constantly in VAR(L) of REECCU model
I am new to PSS/E and python, but any suggestion will be much appreciate!
4 | No.4 Revision |
Hello everyone, I want to build a small system with BESS, and change the active power output from BESS by adding Paux in the REECCU model then test the dynamic simulation, so I have tried the model "BESSjconto20230613" in the post "Example .dyr data for BESS" provide by jconto, so I have some question at this moment as bellow:
import "SMIB_BESS.py"
, the error is as follow:Traceback (most recent call last):
File "<string>", line 1, in <module>
File "SMIB_BESS.py", line 9, in <module>
_i = psspy.getdefaultint()
NameError: name 'psspy' is not defined
Even after import os, sys
will get the same error, but _i = psspy.getdefaultint()
means it did read the script, right? And psspy is no need to import through GUI, so I am confused.
(My PSS/E is v.34)
My print sys.path :
['', 'C:\\Program Files (x86)\\PTI\\PSSE34\\PSSPYTHON27', 'C:\\Program Files (x86)\\PTI\\PSSE34\\PSSPY27', 'C:\\WINDOWS\\SYSTEM32\\python27.zip', 'C:\\Python27\\Lib', 'C:\\Python27\\DLLs', 'C:\\Python27\\Lib\\lib-tk', 'C:\\Users\\POWER\\Documents\\PTI\\PSSE34', 'C:\\Program Files (x86)\\PTI\\PSSE34\\PSSBIN', 'C:\\Python27', 'C:\\Python27\\lib\\site-packages', 'C:\\Python27\\lib\\site-packages\\psse_env_manager', 'C:\\Python27\\lib\\site-packages\\win32', 'C:\\Python27\\lib\\site-packages\\win32\\lib', 'C:\\Python27\\lib\\site-packages\\Pythonwin', 'C:\\Python27\\lib\\site-packages\\wx-3.0-msw']
2.Will it be better to do it by python, not through GUI, if I want to change Paux constantly in VAR(L) of REECCU model
I am new to PSS/E and python, but any suggestion will be much appreciate!
5 | No.5 Revision |
Hello everyone, I want to build a small system with BESS, and change the active power output from BESS by adding Paux in the REECCU model then test the dynamic simulation, so I have tried the model "BESSjconto20230613" in the post "Example .dyr data for BESS" provide by jconto, so I have some question at this moment as bellow:
import "SMIB_BESS.py"
, the error is as follow:Traceback (most recent call last):
File "<string>", line 1, in <module>
File "SMIB_BESS.py", line 9, in <module>
_i = psspy.getdefaultint()
NameError: name 'psspy' is not defined
Even after import os, sys
will get the same error, but _i = psspy.getdefaultint()
means it did read the script, right? And psspy is no need to import through GUI, so I am confused.
(My PSS/E is v.34)
My print sys.path :
['', 'C:\\Program Files (x86)\\PTI\\PSSE34\\PSSPYTHON27', 'C:\\Program Files (x86)\\PTI\\PSSE34\\PSSPY27', 'C:\\WINDOWS\\SYSTEM32\\python27.zip', 'C:\\Python27\\Lib', 'C:\\Python27\\DLLs', 'C:\\Python27\\Lib\\lib-tk', 'C:\\Users\\POWER\\Documents\\PTI\\PSSE34', 'C:\\Program Files (x86)\\PTI\\PSSE34\\PSSBIN', 'C:\\Python27', 'C:\\Python27\\lib\\site-packages', 'C:\\Python27\\lib\\site-packages\\psse_env_manager', 'C:\\Python27\\lib\\site-packages\\win32', 'C:\\Python27\\lib\\site-packages\\win32\\lib', 'C:\\Python27\\lib\\site-packages\\Pythonwin', 'C:\\Python27\\lib\\site-packages\\wx-3.0-msw']
2.Will it be better to do it by python, not through GUI, if I want to change Paux constantly in VAR(L) of REECCU model
I am new to PSS/E and python, but any suggestion will be much appreciate!
Thanks for the reply, I have tried the method you mentioned. (Changing the directory to the working folder and and also copied the two files is done).
Is the python27 folder needed, when execute the python script? Or the code as follow is viable?
C:\..>python SMIB_BESS.py
Because to execute by python in cmd is like >python filename.py
After changing this, I didn't get any return from cmd or PSSe, but if I type
C:\..>SMIB_BESS.py
it will return:
import redirect
ImportError: No module named redirect
Thanks!