+
    iS4                         R t ^ RIt^ RIHt ^ RIHtHtHt ^ RIH	t	 ^ RI
Ht ^ RIHt ^ RIHt ^ RIHtHtHt ^ R	IHt ^ R
IHt  ! R R4      t ! R R4      tR# )zBTests for the ``sympy.physics.biomechanics.activation.py`` module.N)Symbol)FloatIntegerRational)tanh)Matrix)zeros)dynamicsymbols)ActivationBase FirstOrderActivationDeGroote2016ZerothOrderActivation)_NamedMixin)simplifyc                      a  ] tR t^t o ]R 4       t]P                  ! RR7      R 4       tR t	R t
R tR tR	 tR
 tR tR tR tR tR tR tR tRtV tR# )TestZerothOrderActivationc                     \        \        \        4      '       g   Q h\        \        \        4      '       g   Q h\        P                  R 8X  g   Q hR# )r   N)
issubclassr   r
   r   __name__     n/var/www/html/photoedit/myenv/lib/python3.14/site-packages/sympy/physics/biomechanics/tests/test_activation.py
test_class$TestZerothOrderActivation.test_class   s?    /@@@@/====$--1HHHHr   Tautousec                h    R V n         \        R4      V n        \        V P                   4      V n        R# )namee_nameN)r   r	   er   instanceselfs   &r    _zeroth_order_activation_fixture:TestZerothOrderActivation._zeroth_order_activation_fixture   s%    	)-dii8r   c                `    \        V P                  4      p\        V\         4      '       g   Q hR # N)r   r   
isinstancer!   r   s   & r   test_instance'TestZerothOrderActivation.test_instance"   s$    (3($9::::r   c                    \         P                  ! V P                  4      p\        V\         4      '       g   Q hV\        V P                  4      8X  g   Q hR # r%   )r   with_defaultsr   r&   r'   s   & r   test_with_defaults,TestZerothOrderActivation.test_with_defaults&   sB    (66tyyA($9::::0;;;;r   c                    \        V P                  R 4      '       g   Q hV P                  P                  V P                  8X  g   Q hR# r   Nhasattrr   r   r    s   &r   	test_name#TestZerothOrderActivation.test_name+   5    t}}f----}}!!TYY...r   c                |    \        V P                  R 4      '       g   Q hV P                  P                  ^ 8X  g   Q hR# orderNr1   r   r7   r    s   &r   
test_order$TestZerothOrderActivation.test_order/   1    t}}g....}}""a'''r   c                h   \        V P                  R 4      '       g   Q h\        V P                  R4      '       g   Q h\        R4      pV P                  P                  V8X  g   Q hV P                  P                  V8X  g   Q hV P                  P                  V P                  P                  J g   Q hR# r   
excitationr   Nr1   r   r	   r   r>   r!   
e_expecteds   & r   test_excitation_attribute3TestZerothOrderActivation.test_excitation_attribute3       t}}c****t}}l3333#H-
}}*,,,}}'':555}}$--":"::::r   c                   \        V P                  R 4      '       g   Q h\        V P                  R4      '       g   Q h\        R4      pV P                  P                  V8X  g   Q hV P                  P                  V8X  g   Q hV P                  P                  V P                  P                  u;J d   V P                  P
                  J g   Q h Q hR# )a
activationr   N)r1   r   r	   rF   rG   r   r!   
a_expecteds   & r   test_activation_attribute3TestZerothOrderActivation.test_activation_attribute;   s    t}}c****t}}l3333#H-
}}*,,,}}'':555}}$--":":MdmmooMMMMMr   c                   \        V P                  R 4      '       g   Q h\        V P                  R4      '       g   Q hV P                  P                  V P                  P                  8X  g   Q h\	        ^ ^4      pV P                  P                  V8X  g   Q hV P                  P                  V8X  g   Q h\        V P                  P                  \        4      '       g   Q h\        V P                  P                  \        4      '       g   Q hV P                  P                  P                  R8X  g   Q hV P                  P                  P                  R8X  g   Q hR# )x
state_varsN       )r1   r   rM   rN   r   r&   r   shaper!   
x_expecteds   & r   test_state_vars_attribute3TestZerothOrderActivation.test_state_vars_attributeC   s    t}}c****t}}l3333}}$--":"::::1a[
}}*,,,}}'':555$--//62222$--22F;;;;}}$$...}}''--777r   c                   \        V P                  R 4      '       g   Q h\        V P                  R4      '       g   Q hV P                  P                  V P                  P                  8X  g   Q h\	        V P
                  .4      pV P                  P                  V8X  g   Q hV P                  P                  V8X  g   Q h\        V P                  P                  \        4      '       g   Q h\        V P                  P                  \        4      '       g   Q hV P                  P                  P                  R8X  g   Q hV P                  P                  P                  R8X  g   Q hR# r
input_varsNrQ   rQ   r1   r   rY   rZ   r   r   r&   rR   r!   
r_expecteds   & r   test_input_vars_attribute3TestZerothOrderActivation.test_input_vars_attributeO       t}}c****t}}l3333}}$--":"::::TVVH%
}}*,,,}}'':555$--//62222$--22F;;;;}}$$...}}''--777r   c                   \        V P                  R 4      '       g   Q h\        V P                  R4      '       g   Q hV P                  P                  V P                  P                  8X  g   Q h\	        ^ ^4      pV P                  P                  V8X  g   Q hV P                  P                  V8X  g   Q h\        V P                  P                  \        4      '       g   Q h\        V P                  P                  \        4      '       g   Q hV P                  P                  P                  R8X  g   Q hV P                  P                  P                  R8X  g   Q hR# )p	constantsNrO   )r1   r   rc   rd   r   r&   r   rR   r!   
p_expecteds   & r   test_constants_attribute2TestZerothOrderActivation.test_constants_attribute[   s    t}}c****t}}k2222}}$--"9"99991a[
}}*,,,}}&&*444$--//62222$--116::::}}$$...}}&&,,666r   c                8   \        V P                  R 4      '       g   Q h\        . 4      pV P                  P                  V8X  g   Q h\	        V P                  P                  \        4      '       g   Q hV P                  P                  P
                  R8X  g   Q hR# )MN)rP   rP   r1   r   r   rj   r&   rR   r!   
M_expecteds   & r   test_M_attribute*TestZerothOrderActivation.test_M_attributeg   so    t}}c****BZ
}}*,,,$--//62222}}$$...r   c                :   \        V P                  R 4      '       g   Q h\        ^ ^4      pV P                  P                  V8X  g   Q h\	        V P                  P                  \
        4      '       g   Q hV P                  P                  P                  R8X  g   Q hR# )FNrO   )r1   r   r   rq   r&   r   rR   )r!   
F_expecteds   & r   test_F TestZerothOrderActivation.test_Fn   sq    t}}c****1a[
}}*,,,$--//62222}}$$...r   c                    \        V P                  R 4      '       g   Q h\        ^ ^4      pV P                  P                  4       pW!8X  g   Q h\	        V\
        4      '       g   Q hVP                  R8X  g   Q hR# )rhsNrO   )r1   r   r   rv   r&   r   rR   )r!   rhs_expectedrv   s   &  r   test_rhs"TestZerothOrderActivation.test_rhsu   sg    t}}e,,,,Q{mm!"""#v&&&&yyF"""r   c                B    R p\        V P                  4      V8X  g   Q hR# )zZerothOrderActivation('name')Nreprr   r!   expecteds   & r   	test_repr#TestZerothOrderActivation.test_repr}   s    4DMM"h...r   )r   r   r   N)r   
__module____qualname____firstlineno__staticmethodr   pytestfixturer"   r(   r,   r2   r9   rB   rJ   rU   r_   rg   rn   rs   rx   r   __static_attributes____classdictcell____classdict__s   @r   r   r      s}     I I
 ^^D!9 "9
;<
/(;N
8
8
7//#/ /r   r   c            	         a  ] tR t^t o ]R 4       t]P                  ! RR7      R 4       tR t	R t
R tR tR	 tR
 tR tR t]P"                  P%                  RR]! R4      3]! R4      ]! R4      3]! R4      ]! R4      3.4      R 4       tR t]P"                  P%                  RR]! R4      3]! R4      ]! R4      3]! R4      ]! R4      3.4      R 4       tR t]P"                  P%                  RR]! R4      3]! R4      ]! R4      3]! R4      ]! R4      3.4      R 4       tR tR  tR! tR" tR# tR$ t R% t!R& t"R't#V t$R# )($TestFirstOrderActivationDeGroote2016c                     \        \        \        4      '       g   Q h\        \        \        4      '       g   Q h\        P                  R 8X  g   Q hR# )r   N)r   r   r
   r   r   r   r   r   r   /TestFirstOrderActivationDeGroote2016.test_class   s?    :NKKKK:KHHHH/88<^^^^r   Tr   c                *   R V n         \        R4      V n        \        R4      V n        \	        R4      V n        \	        R4      V n        \	        R4      V n        \        V P                   V P
                  V P                  V P                  4      V n	        R# )r   r   a_nametau_atau_dbN)
r   r	   r   rF   r   r   r   r   r   r   r    s   &r   ._first_order_activation_de_groote_2016_fixtureSTestFirstOrderActivationDeGroote2016._first_order_activation_de_groote_2016_fixture   sj    	))G_
G_
8IIJJJJFF	
r   c                `    \        V P                  4      p\        V\         4      '       g   Q hR # r%   )r   r   r&   r'   s   & r   r(   2TestFirstOrderActivationDeGroote2016.test_instance   s$    3DII>($DEEEEr   c                   \         P                  ! V P                  4      p\        V\         4      '       g   Q hVP                  \        R 4      8X  g   Q hVP                  \        R 4      8X  g   Q hVP                  \        R4      8X  g   Q hVP                  \        R4      8X  g   Q hVP                  \        R4      8X  g   Q hVP                  \        R4      8X  g   Q hR# )0.0150.060z10.0N)r   r+   r   r&   r   r   activation_time_constantr   deactivation_time_constantr   smoothing_rater'   s   & r   r,   7TestFirstOrderActivationDeGroote2016.test_with_defaults   s    3AA$))L($DEEEE~~w///00E'NBBB~~w///22eGnDDDzzU6]***&&%-777r   c                    \        V P                  R 4      '       g   Q hV P                  P                  V P                  8X  g   Q hR# r/   r0   r    s   &r   r2   .TestFirstOrderActivationDeGroote2016.test_name   r4   r   c                |    \        V P                  R 4      '       g   Q hV P                  P                  ^8X  g   Q hR# r6   r8   r    s   &r   r9   /TestFirstOrderActivationDeGroote2016.test_order   r;   r   c                h   \        V P                  R 4      '       g   Q h\        V P                  R4      '       g   Q h\        R4      pV P                  P                  V8X  g   Q hV P                  P                  V8X  g   Q hV P                  P                  V P                  P                  J g   Q hR# r=   r?   r@   s   & r   test_excitation4TestFirstOrderActivationDeGroote2016.test_excitation   rD   r   c                D   \         P                  ! \        4      ;_uu_ 4        R V P                  n        R R R 4       \         P                  ! \        4      ;_uu_ 4        R V P                  n        R R R 4       R #   + '       g   i     LN; i  + '       g   i     R # ; ir%   )r   raisesAttributeErrorr   r   r>   r    s   &r   test_excitation_is_immutableATestFirstOrderActivationDeGroote2016.test_excitation_is_immutable   W    ]]>**"DMMO +]]>**'+DMM$ +* +****   A;B;B	B	c                   \        V P                  R 4      '       g   Q h\        V P                  R4      '       g   Q h\        R4      pV P                  P                  V8X  g   Q hV P                  P                  V8X  g   Q hR# )rF   rG   r   N)r1   r   r	   rF   rG   rH   s   & r   test_activation4TestFirstOrderActivationDeGroote2016.test_activation   sh    t}}c****t}}l3333#H-
}}*,,,}}'':555r   c                D   \         P                  ! \        4      ;_uu_ 4        R V P                  n        R R R 4       \         P                  ! \        4      ;_uu_ 4        R V P                  n        R R R 4       R #   + '       g   i     LN; i  + '       g   i     R # ; ir%   )r   r   r   r   rF   rG   r    s   &r   test_activation_is_immutableATestFirstOrderActivationDeGroote2016.test_activation_is_immutable   r   r   ztau_a, expectedN
tau_a_namer   r   c                    \        R VR7      pVP                  V8X  g   Q hVP                  V8X  g   Q hVP                  VP                  J g   Q hR# )r   )r   N)r   r   r   )r!   r   r~   r   s   &&& r   test_activation_time_constantBTestFirstOrderActivationDeGroote2016.test_activation_time_constant   sS     4U
 ~~)))00H<<<~~!B!BBBBr   c                D   \         P                  ! \        4      ;_uu_ 4        R V P                  n        R R R 4       \         P                  ! \        4      ;_uu_ 4        R V P                  n        R R R 4       R #   + '       g   i     LN; i  + '       g   i     R # ; ir%   )r   r   r   r   r   r   r    s   &r   *test_activation_time_constant_is_immutableOTestFirstOrderActivationDeGroote2016.test_activation_time_constant_is_immutable   sX    ]]>**"&DMM +]]>**59DMM2 +* +****r   ztau_d, expected
tau_d_namer   r   c                    \        R VR7      pVP                  V8X  g   Q hVP                  V8X  g   Q hVP                  VP                  J g   Q hR# )r   )r   N)r   r   r   )r!   r   r~   r   s   &&& r   test_deactivation_time_constantDTestFirstOrderActivationDeGroote2016.test_deactivation_time_constant   sS     4u
 ~~)))22h>>>~~!D!DDDDr   c                D   \         P                  ! \        4      ;_uu_ 4        R V P                  n        R R R 4       \         P                  ! \        4      ;_uu_ 4        R V P                  n        R R R 4       R #   + '       g   i     LN; i  + '       g   i     R # ; ir%   )r   r   r   r   r   r   r    s   &r   ,test_deactivation_time_constant_is_immutableQTestFirstOrderActivationDeGroote2016.test_deactivation_time_constant_is_immutable   sX    ]]>**"&DMM +]]>**7;DMM4 +* +****r   zb, expectedb_namer   10c                    \        R VR7      pVP                  V8X  g   Q hVP                  V8X  g   Q hVP                  VP                  J g   Q hR# )r   )r   N)r   r   r   )r!   r   r~   r   s   &&& r   test_smoothing_rate8TestFirstOrderActivationDeGroote2016.test_smoothing_rate   sS     41
 zzX%%%&&(222zzX44444r   c                D   \         P                  ! \        4      ;_uu_ 4        R V P                  n        R R R 4       \         P                  ! \        4      ;_uu_ 4        R V P                  n        R R R 4       R #   + '       g   i     LN; i  + '       g   i     R # ; ir%   )r   r   r   r   r   r   r    s   &r    test_smoothing_rate_is_immutableETestFirstOrderActivationDeGroote2016.test_smoothing_rate_is_immutable  sW    ]]>**"DMMO +]]>**+/DMM( +* +****r   c                   \        V P                  R 4      '       g   Q h\        V P                  R4      '       g   Q hV P                  P                  V P                  P                  8X  g   Q h\	        V P
                  .4      pV P                  P                  V8X  g   Q hV P                  P                  V8X  g   Q h\        V P                  P                  \        4      '       g   Q h\        V P                  P                  \        4      '       g   Q hV P                  P                  P                  R8X  g   Q hV P                  P                  P                  R8X  g   Q hR# )rM   rN   Nr[   )r1   r   rM   rN   r   rF   r&   rR   rS   s   & r   test_state_vars4TestFirstOrderActivationDeGroote2016.test_state_vars  ra   r   c                   \        V P                  R 4      '       g   Q h\        V P                  R4      '       g   Q hV P                  P                  V P                  P                  8X  g   Q h\	        V P
                  .4      pV P                  P                  V8X  g   Q hV P                  P                  V8X  g   Q h\        V P                  P                  \        4      '       g   Q h\        V P                  P                  \        4      '       g   Q hV P                  P                  P                  R8X  g   Q hV P                  P                  P                  R8X  g   Q hR# rX   r\   r]   s   & r   test_input_vars4TestFirstOrderActivationDeGroote2016.test_input_vars  ra   r   c                   \        V P                  R 4      '       g   Q h\        V P                  R4      '       g   Q hV P                  P                  V P                  P                  8X  g   Q h\	        V P
                  V P                  V P                  .4      pV P                  P                  V8X  g   Q hV P                  P                  V8X  g   Q h\        V P                  P                  \        4      '       g   Q h\        V P                  P                  \        4      '       g   Q hV P                  P                  P                  R8X  g   Q hV P                  P                  P                  R8X  g   Q hR# )rc   rd   N)   rQ   )
r1   r   rc   rd   r   r   r   r   r&   rR   re   s   & r   test_constants3TestFirstOrderActivationDeGroote2016.test_constants$  s   t}}c****t}}k2222}}$--"9"9999TZZTVV<=
}}*,,,}}&&*444$--//62222$--116::::}}$$...}}&&,,666r   c                :   \        V P                  R 4      '       g   Q h\        ^.4      pV P                  P                  V8X  g   Q h\	        V P                  P                  \        4      '       g   Q hV P                  P                  P
                  R8X  g   Q hR# )rj   Nr[   rk   rl   s   & r   test_M+TestFirstOrderActivationDeGroote2016.test_M0  sq    t}}c****QC[
}}*,,,$--//62222}}$$...r   c           	     
   \        V P                  R 4      '       g   Q h^V P                  \        ^^4      \        ^^4      V P                  ,          ,           ,          ,          \        ^^4      \        ^^4      \        V P                  V P                  V P                  ,
          ,          4      ,          ,           ,          \        ^^4      \        ^^4      V P                  ,          ,           V P                  ,          \        ^^4      \        ^^4      \        V P                  V P                  V P                  ,
          ,          4      ,          ,
          ,          ,           V P                  V P                  ,
          ,          p\        V.4      pV P                  P                  V8X  g   Q h\        V P                  P                  \        4      '       g   Q hV P                  P                  P                  R8X  g   Q hR# )rq   Nr[   )r1   r   r   r   rF   r   r   r   r   r   rq   r&   rR   )r!   da_exprrr   s   &  r   rs   +TestFirstOrderActivationDeGroote2016.test_F7  sX   t}}c****Xa^hq!nTVV.CCDEq!nx1~d466466DFF?3K.LLLNA!Q!66

Bq!nx1~d466466DFF?3K.LLLNN fftvvo	 	 WI&
}}*,,,$--//62222}}$$...r   c           	     v   \        V P                  R 4      '       g   Q h^V P                  \        ^^4      \        ^^4      V P                  ,          ,           ,          ,          \        ^^4      \        ^^4      \        V P                  V P                  V P                  ,
          ,          4      ,          ,           ,          \        ^^4      \        ^^4      V P                  ,          ,           V P                  ,          \        ^^4      \        ^^4      \        V P                  V P                  V P                  ,
          ,          4      ,          ,
          ,          ,           V P                  V P                  ,
          ,          p\        V.4      pV P                  P                  4       pW28X  g   Q h\        V\        4      '       g   Q hVP                  R8X  g   Q h\        V P                  P                  P                  V P                  P                   4      V,
          4      \#        ^4      8X  g   Q hR# )rv   Nr[   )r1   r   r   r   rF   r   r   r   r   r   rv   r&   rR   r   rj   solverq   r   )r!   r   rw   rv   s   &   r   rx   -TestFirstOrderActivationDeGroote2016.test_rhsE  s   t}}e,,,,Xa^hq!nTVV.CCDEq!nx1~d466466DFF?3K.LLLNA!Q!66

Bq!nx1~d466466DFF?3K.LLLNN fftvvo	 	 wi(mm!"""#v&&&&yyF"""--dmmoo>DEqQQQr   c                B    R p\        V P                  4      V8X  g   Q hR# )z|FirstOrderActivationDeGroote2016('name', activation_time_constant=tau_a, deactivation_time_constant=tau_d, smoothing_rate=b)Nr{   r}   s   & r   r   .TestFirstOrderActivationDeGroote2016.test_reprU  s%      	 DMM"h...r   )rF   r   r   r   r   r   r   )%r   r   r   r   r   r   r   r   r   r(   r,   r2   r9   r   r   r   r   markparametrizer   r   r   r   r   r   r   r   r   r   r   r   r   rs   rx   r   r   r   r   s   @r   r   r      s    _ _
 ^^D!
 "
F8/(;,6, [[6,'(G_fWo.7^U7^,	
CC: [[6,'(G_fWo.7^U7^,	
EE< [[6(#$C[&+&T]GDM*	
550
8
8
7//R / /r   r   )__doc__r   sympyr   sympy.core.numbersr   r   r   %sympy.functions.elementary.hyperbolicr   sympy.matricesr   sympy.matrices.denser   sympy.physics.mechanicsr	   sympy.physics.biomechanicsr
   r   r   !sympy.physics.biomechanics._mixinr   sympy.simplify.simplifyr   r   r   r   r   r   <module>r      sK    H   7 7 6 ! & 2 
 : ,k/ k/\Z/ Z/r   