First time here? We are a friendly community of Power Systems Engineers. Check out the FAQ!
1 | initial version |
The code attached is a simple example on using the module 'excelpy', provided by PTI in the PSSe installation. Basic writing and reading to an excel file. The scaling of load (by zone or other criteria) and changing machine Pgen values are functions included in the API manual, and relative easy to execute.
Once you have an excel file with defined format for your load and gen data, use the py code to read it within a loop until data input is empty. At each loop reading, load a base case, execute the scale and change of gen, maybe solve it and then save it to a different filename. C:\fakepath\excelpy_demo.py.png
2 | No.2 Revision |
The code attached is a simple example on using the module 'excelpy', provided by PTI in the PSSe installation. Basic writing and reading to an excel file. The scaling of load (by zone or other criteria) and changing machine Pgen values are functions included in the API manual, and relative easy to execute.
Once you have an excel file with defined format for your load and gen data, use the py code to read it within a loop until data input is empty. At each loop reading, load a base case, execute the scale and change of gen, maybe solve it and then save it to a different filename.
C:\fakepath\excelpy_demo.py.pngfilename.
Download the excelpydemo.py code [copy the link into your browser if it does not connect when clicking on it]:JContogoogle drive. Once you select “excelpy_demo.py”, an icon on the top-center screen will perform the download.