I haven't looked at SymPy's specific code for generating equations of
motion but I have used SymPy for generating equations of motion and
other mechanics related problems.

The example here:
    https://github.com/sympy/sympy/issues/16207
comes from a mechanics problem and was slow because of slow matrix
calculations where the matrix has symbolic coefficients.

Note that the matrix in question is 13x13 so much smaller than anyone
would consider these large matrix multiplication algorithms to be
useful. The slowness of symbolic calculations makes it possible to
consider entirely different optimisations than those used in numeric
libraries though. In #16207 I can get a 50x speed up by factoring the
block structure of the matrix. The speed difference would be even
bigger for larger matrices. For a numeric library the additional
checks I performed to discover if that optimisation was possible would
cause a noticeable slowdown in the cases where the method doesn't
apply so that kind of thing wouldn't be considered.

Although #16207 is about eigenvalues the same principles can apply to
matrix multiplication and to solving systems of equations etc.

On Thu, 14 Mar 2019 at 19:50, Aaron Meurer <asmeu...@gmail.com> wrote:
>
> For matrices in sympy, I suspect in most cases the best speed ups would come 
> from removing  overhead from the calculations, rather than from algorithmic 
> improvements. Many of the algorithms mentioned here are only theoretically 
> faster, or only faster asymptoticly. In some cases, they would only be faster 
> for matrices that are larger than anything sympy could reasonably handle.
>
> Benchmarking and profiling are very important if you are looking to improve 
> performance. Also take a look at the benchmarking idea on the GSoC ideas page.
>
> Aaron Meurer
>
> On Thu, Mar 14, 2019 at 12:04 PM Vishesh Mangla <manglavishes...@gmail.com> 
> wrote:
>>
>> Give me 2 days since currently I am having my mid sems. I will respond asap 
>> once I read it.
>>
>>
>>
>> Sent from Mail for Windows 10
>>
>>
>>
>> From: Jason Moore
>> Sent: 14 March 2019 22:56
>> To: sympy@googlegroups.com
>> Subject: Re: [sympy] Gsoc Project idea " Efficient Equation 
>> ofMotionGenerationwith Python" discussion.
>>
>>
>>
>> Work to speed up matrix algorithms given assumptions on matrices would help.
>>
>>
>>
>> Jason
>>
>> moorepants.info
>> +01 530-601-9791
>>
>>
>>
>>
>>
>> On Thu, Mar 14, 2019 at 9:31 AM Shiksha Rawat <shiksharawa...@gmail.com> 
>> wrote:
>>
>> https://web.wpi.edu/Pubs/ETD/Available/etd-012318-234642/unrestricted/zli.pdf
>>  in this I think the description on "Embedding Matrix Multiplication in a 
>> Group Algebra "  on page number 10 can be helpful.
>>
>>
>>
>>
>>
>>
>>
>> On Thu, Mar 14, 2019 at 8:33 PM Shiksha Rawat <shiksharawa...@gmail.com> 
>> wrote:
>>
>> Can Jason Moore or Oscar suggest anything,please?
>>
>>
>>
>>
>>
>>
>>
>> On Thu, Mar 14, 2019 at 6:56 PM Vishesh Mangla <manglavishes...@gmail.com> 
>> wrote:
>>
>> Well, I can’t say much because I ‘m not a maths student and just study maths 
>> because I like doing so.
>>
>> In this case you would be knowing it better than me.
>>
>>
>>
>> Sent from Mail for Windows 10
>>
>>
>>
>> From: Shiksha Rawat
>> Sent: 14 March 2019 18:49
>> To: sympy
>> Subject: Re: [sympy] Gsoc Project idea " Efficient Equation 
>> ofMotionGeneration with Python" discussion.
>>
>>
>>
>> Yes, I have studied group theory in my college curriculum.
>>
>> I tried to find ways by which group theory cap to used to simplify matrix 
>> multiplication and came across 
>> https://web.wpi.edu/Pubs/ETD/Available/etd-012318-234642/unrestricted/zli.pdf
>>
>> and http://www.ccs.neu.edu/home/viola/classes/gems-08/lectures/le21-23.pdf.
>>
>>
>>
>> The ways suggested here can be used even when the dimensions of matrix are 
>> not very large.
>>
>>
>>
>> Can this be of any help?
>>
>>
>>
>> On Thu, Mar 14, 2019 at 3:48 PM Vishesh Mangla <manglavishes...@gmail.com> 
>> wrote:
>>
>> Well if you see these algorithms are not for general purpose matrices but 
>> for where high accuracy is required. I would rather say to use concepts of 
>> group theory and representation theory (i do not have lot of knowledge about 
>> this but 'm studying) which can reduce matrices to lower dimensions.If you 
>> or your friends are from mathematical backgrounds they might be able to tell 
>> you better if this can make it easier what you want to do.
>>
>>
>>
>> On Thu, Mar 14, 2019, 15:07 <abhinav.sagar2...@vitstudent.ac.in> wrote:
>>
>> I think you are confused with numpy and scipy.I don't think the algorithm 
>> mentioned by you is much helpful to this cause. Could you please check out 
>> some more algorithm for the same.
>>
>> --
>> 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 sympy+unsubscr...@googlegroups.com.
>> To post to this group, send email to sympy@googlegroups.com.
>> Visit this group at https://groups.google.com/group/sympy.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/sympy/ff670eab-fe67-498c-ab45-b4abbd5018c5%40googlegroups.com.
>> For more options, visit https://groups.google.com/d/optout.
>>
>> --
>> 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 sympy+unsubscr...@googlegroups.com.
>> To post to this group, send email to sympy@googlegroups.com.
>> Visit this group at https://groups.google.com/group/sympy.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/sympy/CACaE8x4ccaTQ3HsC6OGutHjkoJjBkKN%2BZ7VVz7gn%2BHZPzqCbUQ%40mail.gmail.com.
>> For more options, visit https://groups.google.com/d/optout.
>>
>> --
>> 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 sympy+unsubscr...@googlegroups.com.
>> To post to this group, send email to sympy@googlegroups.com.
>> Visit this group at https://groups.google.com/group/sympy.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/sympy/CAKVsmS6yAn2JiMbOXuhEEB%2B59ucL6ii5nRtm107LP%2BTB%2BdW%2BLw%40mail.gmail.com.
>> For more options, visit https://groups.google.com/d/optout.
>>
>>
>>
>> --
>> 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 sympy+unsubscr...@googlegroups.com.
>> To post to this group, send email to sympy@googlegroups.com.
>> Visit this group at https://groups.google.com/group/sympy.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/sympy/5c8a5671.1c69fb81.44872.5298%40mx.google.com.
>> For more options, visit https://groups.google.com/d/optout.
>>
>> --
>> 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 sympy+unsubscr...@googlegroups.com.
>> To post to this group, send email to sympy@googlegroups.com.
>> Visit this group at https://groups.google.com/group/sympy.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/sympy/CAKVsmS6Y3LnMxhRRv7J0g4fzR7zTqq_m8TaC066kH7wHhFjuQA%40mail.gmail.com.
>> For more options, visit https://groups.google.com/d/optout.
>>
>> --
>> 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 sympy+unsubscr...@googlegroups.com.
>> To post to this group, send email to sympy@googlegroups.com.
>> Visit this group at https://groups.google.com/group/sympy.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/sympy/CAP7f1AgcAmRzaGAXx3Th3%2BY5vNVuDjW1%3DwywgXCvbsCbPbcrZg%40mail.gmail.com.
>> For more options, visit https://groups.google.com/d/optout.
>>
>>
>>
>> --
>> 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 sympy+unsubscr...@googlegroups.com.
>> To post to this group, send email to sympy@googlegroups.com.
>> Visit this group at https://groups.google.com/group/sympy.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/sympy/5c8a97ba.1c69fb81.a0f0e.3d84%40mx.google.com.
>> For more options, visit https://groups.google.com/d/optout.
>
> --
> 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 sympy+unsubscr...@googlegroups.com.
> To post to this group, send email to sympy@googlegroups.com.
> Visit this group at https://groups.google.com/group/sympy.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/sympy/CAKgW%3D6%2BXZxaVKN%3DcMKzYcTgBYiTn2%3DWjb4DOwEBtuDeygvdoKQ%40mail.gmail.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
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 sympy+unsubscr...@googlegroups.com.
To post to this group, send email to sympy@googlegroups.com.
Visit this group at https://groups.google.com/group/sympy.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sympy/CAHVvXxTepKm0dJMfKGrhxaSYSE7-VVumHR55qGBW0d8f2ZP_zg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to