+
    i?                     <    R t ^ RIHt ^ RIHu Ht RR ltRR lt	R# )zOThis module contains some sample symbolic models used for testing and
examples.)backendNc                   \         P                  ! RP                  V 4      4      p\         P                  ! RP                  V 4      4      p\         P                  ! RP                  V 4      4      p\         P                  ! R4      p\        P                  ! RP                  V 4      4      p\        P                  ! RP                  V 4      4      p\        P                  ! RP                  V 4      4      p	\        P
                  ! R4      p
\        P                  ! R	4      pVP                  V
^ 4       V.p. p. p. p\        V 4       EF  pVR,          P                  R
P                  V4      VV,          V
P                  ,          4      pVP                  WR,          P                  V
4      VV,          V
P                  ,          ,           4       VP                  V4       \        P                  ! RP                  V4      VVV,          4      pVP                  VV,          VV,          P                  4       ,
          4       VV,          ) VV,          ,          VV,          VV,          ,          ,
          p VVV^,           ,          VV^,           ,          ,          VV^,           ,          VV^,           ,          ,          ,           ,          pV'       d   VVV,          V,          ,          pV'       d   VV	V,          ,          pVP                  VVV
P                  ,          34       VP                  V4       EK  	  \        P                   ! WVVR7      pVP#                  W4       V#   \         d     Li ; i)a  Returns a system containing the symbolic equations of motion and
associated variables for a simple multi-degree of freedom point mass,
spring, damper system with optional gravitational and external
specified forces. For example, a two mass system under the influence of
gravity and external forces looks like:

::

    ----------------
     |     |     |   | g
     \    | |    |   V
  k0 /    --- c0 |
     |     |     | x0, v0
    ---------    V
    |  m0   | -----
    ---------    |
     | |   |     |
     \ v  | |    |
  k1 / f0 --- c1 |
     |     |     | x1, v1
    ---------    V
    |  m1   | -----
    ---------
       | f1
       V

Parameters
==========

n : integer
    The number of masses in the serial chain.
apply_gravity : boolean
    If true, gravity will be applied to each mass.
apply_external_forces : boolean
    If true, a time varying external force will be applied to each mass.

Returns
=======

kane : sympy.physics.mechanics.kane.KanesMethod
    A KanesMethod object.

m:{}zk:{}zc:{}gzx:{}zv:{}zf:{}Noriginzcenter{}zblock{}q_indu_indkd_eqs)smsymbolsformatmedynamicsymbolsReferenceFramePointset_velrange	locatenewxvelappendParticlediff
IndexErrorKanesMethodkanes_equations)napply_gravityapply_external_forcesmass	stiffnessdampingacceleration_due_to_gravitycoordinatesspeeds
specifiedsceilingr   pointskinematic_equations	particlesforcesicenterblocktotal_forcekanes   &&&                  ~/Users/tonyclaw/.openclaw/workspace/skills/math-calculator/venv/lib/python3.14/site-packages/sympy/physics/mechanics/models.pymulti_mass_spring_damperr4   
   s   \ ::fmmA&'D

6==+,Ijjq)*G"$**S/##FMM!$45Kv}}Q/0F""6==#34J$GXXhF
NN7AXFIF1X%%j&7&7&:&1!nwyy&@Bwr
w 7ay799,!- 	.fI,,Q/aA""6!9{1~/B/B/D#DE!!}{1~5qzF1I-.	Ia!e,{1q5/AA#AENVAE]:; <K
 47%@@@K :a=(Kv{WYY6789 < >>'F!46D+K#  		s   9AM,,M:9M:c                
   V ^ 8:  d   \        R4      h\        P                  ! RP                  V ^,           4      4      p\        P                  ! RP                  V ^,           4      4      pVRJ d-   \        P                  ! RP                  V ^,           4      4      p\        P
                  ! RP                  V ^,           4      4      p\        P
                  ! RP                  V 4      4      p\        P
                  ! R4      w  r\        P                  ! R	4      p
\        P                  ! R
4      pVP                  V
^ 4       \        P                  ! R4      pVP                  W^ ,          V
P                  ,          4       VP                  W^ ,          V
P                  ,          4       \        P                  ! RW^ ,          4      pV
.pV.pV.pW^ ,          ) V,          V
P                  ,          3.pV^ ,          P                  V	4      V^ ,          ,
          .pVRJ g   VRJ d   . pMRp\        V 4       EF  pV
P                  RP                  V4      RVV^,           ,          V
P                   .4      pVP#                  WV^,           ,          V
P                   ,          4       VP%                  V4       VR,          P'                  RP                  V^,           4      VV,          VP                  ,          4      pVP)                  VR,          V
V4       VP%                  V4       \        P                  ! R\+        V^,           4      ,           VVV^,           ,          4      pVP%                  V4       VP%                  VVV^,           ,          ) V,          V
P                  ,          34       VRJ d   VP%                  XV,          4       V^ 8X  d,   VP%                  WV,          ) V
P                   ,          34       VV ^,
          8X  d-   VP%                  VVV,          V
P                   ,          34       MQVP%                  VVV,          V
P                   ,          VV^,           ,          V
P                   ,          ,
          34       VP%                  VV^,           ,          P                  V	4      VV^,           ,          ,
          4       EK  	  VRJ dL   \        P                  ! R4      pVP%                  VVV
P                  ,          34       VP%                  V4       \        P,                  ! WVVR7      pVP/                  VV4       V# )a  Returns the system containing the symbolic first order equations of
motion for a 2D n-link pendulum on a sliding cart under the influence of
gravity.

::

              |
     o    y   v
      \ 0 ^   g
       \  |
      --\-|----
      |  \|   |
  F-> |   o --|---> x
      |       |
      ---------
       o     o

Parameters
==========

n : integer
    The number of links in the pendulum.
cart_force : boolean, default=True
    If true an external specified lateral force is applied to the cart.
joint_torques : boolean, default=False
    If true joint torques will be added as specified inputs at each
    joint.

Returns
=======

kane : sympy.physics.mechanics.kane.KanesMethod
    A KanesMethod object.

Notes
=====

The degrees of freedom of the system are n + 1, i.e. one for each
pendulum link and one for the lateral motion of the cart.

M x' = F, where x = [u0, ..., un+1, q0, ..., qn+1]

The joint angles are all defined relative to the ground where the x axis
defines the ground line and the y axis points up. The joint torques are
applied between each adjacent link and the between the cart and the
lower link where a positive torque corresponds to positive angle.

z/The number of links must be a positive integer.zq:{}zu:{}TzT1:{}r   zl:{}zg tIOP0Pa0NzB{}AxiszP{}PaFr   r   )
ValueErrorr   r   r   r   r   r   r   r   set_posr   r   yr   r   	orientnewzset_ang_velr   r   v2pt_theorystrr   r   )r   
cart_forcejoint_torquesquTmlr   tr6   r7   r8   r9   framesr*   r,   r-   kindiffs	specifiedr.   BiPiPair<   r2   s   &&&                       r3   n_link_pendulum_on_cartrS   p   s   b 	AvJKK
&--A./A
&--A./AgnnQU34


6==Q'(A


6==#$A::eDA
#A
AIIaO	$BJJqA$*JJqA$*
++eR1
&CSFTFIaD519qss?#$F!		!qt#$HT]d2		1X[[a&1QU8QSS/B
qAE(QSS.)bBZ!!%,,q1u"5qtbdd{C
vbz1b)bkk$QU+R1q5:rAa!eH9q=133./0D QqT"AvqQ4%!##+./AEzr1Q4!##:./r1Q4!##:!a%133#>?@!a%a(1QU8345 8 Tc"r1qss7m$>>!Ah?DF+K    )   FF)rU   TF)
__doc__
sympy.corer   r   sympy.physics.mechanicsphysics	mechanicsr   r4   rS    rT   r3   <module>r\      s"    % $ $cLvrT   