Skip to content

Commit

Permalink
evaluate parameter in parent scope
Browse files Browse the repository at this point in the history
  • Loading branch information
baggepinnen committed Sep 21, 2024
1 parent 5b89f1a commit 4830367
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/src/examples/suspension.md
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ The connection between the wheels and the ground form two kinematic loops togeth
z0 = 0.0,
der_angles = [0, 0, 0],
iscut = true, # NOTE: Only used since while we have an "upright joint"
surface = (x,z)->amplitude*(sin(2pi*freq*t)), # Excitation from a time-varying surface profile
surface = (x,z)->amplitude*(sin(2pi*ParentScope(ParentScope(freq))*t)), # Excitation from a time-varying surface profile
)
end
Expand Down Expand Up @@ -373,7 +373,7 @@ defs = [
display(sort(unknowns(ssys), by=string))
prob = ODEProblem(ssys, defs, (0, 4))
sol = solve(prob, FBDF(autodiff=false), initializealg = ShampineCollocationInit())
sol = solve(prob, Rodas5P(autodiff=false), initializealg = ShampineCollocationInit()) # FBDF is inefficient for models including the `SlippingWheel` component due to the discontinuous second-order derivative of the slip model
@test SciMLBase.successful_retcode(sol)
Multibody.render(model, sol, show_axis=false, x=-1.5, y=0.3, z=0.0, lookat=[0,0.1,0.0], timescale=3, filename="suspension_halfcar_wheels.gif") # Video
nothing # hide
Expand Down

0 comments on commit 4830367

Please sign in to comment.