Model writing using Python
Hey Guys, I am wondering if anyone has tried writing a model using Python. If yes what are the steps that will be helpful for a a new PSSE user.
Thanks
First time here? We are a friendly community of Power Systems Engineers. Check out the FAQ!
Hey Guys, I am wondering if anyone has tried writing a model using Python. If yes what are the steps that will be helpful for a a new PSSE user.
Thanks
Model writing is done using Fortran, following a rigid model developing process, with enough knowledge of the 'guts' of the PSSe libraries, to be able to use global variables and functions to represent the equations of your model. I do not know if PTI is planning to add python as a model development platform but at this time python is not supported.
There is a way to do this but it requires a bit of fortran knowledge. Use the system
call in your fortran model:
call system(command [,status])
status = system(command)
where
command
is the command you want to perform (python.exe your_code.py
) character
status
is the return status integer
There are some considerations to take here:
It seems to be a rough and dirty way of developing models, but you have to think differently: this system calls can allow to communicate your models with other systems (even between multiple simulations, internet information, etc.), while performing a primary execution through fortran.
I hope it helps. Open your mind.
Asked: 2013-11-15 11:03:16 -0600
Seen: 994 times
Last updated: Jul 10 '14
Thanks Jconto.