Skip to content

Commit

Permalink
refactor: -= instead of +=-
Browse files Browse the repository at this point in the history
  • Loading branch information
Ipuch committed Nov 8, 2024
1 parent 0064c2a commit 1cdaf8e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bioptim/examples/torque_driven_ocp/spring_load.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ def custom_dynamic(
tau = DynamicsFunctions.get(nlp.controls["tau"], controls)

stiffness = 100
tau += -sign(q[0]) * stiffness * q[0] # damping
tau -= sign(q[0]) * stiffness * q[0] # damping

qddot = nlp.model.forward_dynamics(with_contact=False)(q, qdot, tau, [], [])

Expand Down

0 comments on commit 1cdaf8e

Please sign in to comment.