The main problem I had so far is that there doesn't seem to be a good
alternative to simulink in python. so my plan was to compile the
simulink model into C code and use some kind of API to transfer the
results into python. Currently I'm saving the result to hard drive and
load it in scipy, but this is very slow.
I was wondering, is there any existing module or something that will
allow the transfer to be done in memory?
Another problem is that I need to extract the state space matrix from
a simulink model, does anyone know a way to do this without using
matlab?
Thanks,
Xiangyu Ding
_______________________________________________
SciPy-user mailing list
SciPy...@scipy.org
http://mail.scipy.org/mailman/listinfo/scipy-user
On 3-Apr-09, at 6:35 PM, Xiangyu Ding wrote:
>
> I was wondering, is there any existing module or something that will
> allow the transfer to be done in memory?
This sounds roughly like a job for Cython's numpy buffer support. It
would allow you call whatever C functions you need to and expose
contiguous blocks of memory (to which you have a pointer) to Python
code.
See the tutorial at: http://wiki.cython.org/tutorials/numpy
David
Xiangyu Ding wrote:
> I just started using python and plan to port a matlab simulation
> software to python.
>
> The main problem I had so far is that there doesn't seem to be a good
> alternative to simulink in python.
I'm working on PyLab_Works, which should be able to be a replacement for
both Simulink and PowerSim.
although not yet released, you might get an impression here:
http://code.google.com/p/pylab-works/
cheers,
Stef
> I just started using python and plan to port a matlab simulation
> software to python.
>
> The main problem I had so far is that there doesn't seem to be a good
> alternative to simulink in python. so my plan was to compile the
> simulink model into C code and use some kind of API to transfer the
> results into python. Currently I'm saving the result to hard drive and
> load it in scipy, but this is very slow.
What does simulink do that you miss? Is it the gui?
For what it's worth, electrical engineers used to design using schematics.
Now design is described in text. There's a reason for this. Schematics are
only useful for simple designs. Once they become more complex, it's much
more efficient to work with text. Not to mention the ability to manipulate
text, and the ability to transfer text-based designs between systems.
Neal wrote:
> For what it's worth, electrical engineers used to design using schematics.
> Now design is described in text. There's a reason for this. Schematics are
> only useful for simple designs. Once they become more complex, it's much
> more efficient to work with text. Not to mention the ability to manipulate
> text, and the ability to transfer text-based designs between systems.
I guess I need to clarify that the software I'm writing is for
Reliability analysis purpose and lots of the system that it will be
used to test have schematics in Simulink, that's the main reason I
have to work with Simulink. I was considering porting everything to
python if there were parser that will convert Simulink model into some
equivalent model in python, the gui doesn't really matter. but I don't
know of any tools that will do this.