Le 01/11/13 11:54, Jason Moore a écrit :
I've been tinkering with code generation for ODE's that
sympy.physics.mechanics spits out and have some results:
http://www.moorepants.info/blog/pydy-code-gen.html
Several people have posted topics on this recently. We need to build in
a code generator for solving ODE's into SymPy that would play well with
the codegen and autowrap modules. I think I can use this code I wrote as
a base to start working on that but would need some help generalizing it
beyond our systems. Feedback is welcome.
I've only looked at the derivation part, it's an interesting
real-world(ish) benchmark for expression manipulation. However, it
incurs a lot of avoidable overhead:
* Extracting some loop constants out of their loops cuts down the
run-time by 40%, cf. https://github.com/sympy/sympy/pull/2570
* The creation of temporary objects by the Vector class takes up most of
the run-time.
* The internal representation of Vector objects seems inefficient. I
think it should be switched to a dict-based representation as a linear
combination of base vectors (e.g. using {I.x: l0, B.y: -l1} for l0 * I.x
- l1 * B.y).
--
You received this message because you are subscribed to the Google Groups
"sympy" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sympy.
For more options, visit https://groups.google.com/groups/opt_out.