Hi,

I implemented some optimizations (not yet pushed) which allowed me to run

trigsimp_groebner(smallExpr, quick=True, hints=[2])

in "reasonable" time (~5 minutes).

The result is this:

ddq1*(sin(q2)*sin(q4)*cos(2*q3) + cos(q2)*cos(q3)*cos(q4)) - ddq2*sin(2*q3)*sin(q4) + ddq3*cos(q3)*cos(q4) + ddq4*sin(q3)*sin(q4) + dq1**2*(-sin(2*q2)*sin(2*q3)*sin(q4)/2 - sin(q3)*cos(2*q2)*cos(q4)) + dq1*dq3*(-2*sin(q2)*sin(2*q3)*sin(q4) - 2*sin(q3)*cos(q2)*cos(q4)) + dq1*dq4*(sin(q2)*cos(2*q3)*cos(q4) - sin(q2)*cos(q4)) - 2*dq2*dq3*sin(q4)*cos(2*q3) - dq2*dq4*sin(2*q3)*cos(q4) - dq3**2*sin(q3)*cos(q4) + dq4**2*sin(q3)*cos(q4)

(len(str(smallExpr))/len(str(this)) is about 30!)

It seems quite possible to run trigsimp_groebner with more aggressive parameters on this much shorter expression ... but I'll have breakfast now :-).


On 20.04.2012 02:22, Aaron Meurer wrote:
Great.  I think the best way to demonstrate new functionality like
this is to just create a special function that does it (like
trigsimp_groebner) in some branch, and add that to __init__.py.  Then,
when it is ready to go in, remove it from __init__.py and integrate it
directly into the main function (in this case trigsimp).  This is how
I've done things with risch_integrate in my integration3 branch, and I
plan to remove it and just put it in integrate() when I'm done.

I tried the expressions from
https://groups.google.com/d/topic/sympy/3y6orHV2_4k/discussion (see
the tarball linked to in the first post).  I just tried the small
expression with n=1, but it just hung on the reduction step.  Any
thoughts on how to make this faster? Those expressions would make good
stress tests for this.

Aaron Meurer

On Thu, Apr 19, 2012 at 3:03 PM, Tom Bachmann<e_mc...@web.de>  wrote:
I have pushed a more usable trigsimp_groebner to my new trigsimp branch. It
is probably buggy, but I've had enough for today. Just to let anyone know
who might wish to try it out :).


Best,
Tom

--
You received this message because you are subscribed to the Google Groups
"sympy" group.
To post to this group, send email to sympy@googlegroups.com.
To unsubscribe from this group, send email to
sympy+unsubscr...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/sympy?hl=en.



--
You received this message because you are subscribed to the Google Groups 
"sympy" group.
To post to this group, send email to sympy@googlegroups.com.
To unsubscribe from this group, send email to 
sympy+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sympy?hl=en.

Reply via email to