Skip to content

Commit 4830367

Browse files
committed
evaluate parameter in parent scope
1 parent 5b89f1a commit 4830367

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docs/src/examples/suspension.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,7 @@ The connection between the wheels and the ground form two kinematic loops togeth
298298
z0 = 0.0,
299299
der_angles = [0, 0, 0],
300300
iscut = true, # NOTE: Only used since while we have an "upright joint"
301-
surface = (x,z)->amplitude*(sin(2pi*freq*t)), # Excitation from a time-varying surface profile
301+
surface = (x,z)->amplitude*(sin(2pi*ParentScope(ParentScope(freq))*t)), # Excitation from a time-varying surface profile
302302
)
303303
304304
end
@@ -373,7 +373,7 @@ defs = [
373373
display(sort(unknowns(ssys), by=string))
374374
375375
prob = ODEProblem(ssys, defs, (0, 4))
376-
sol = solve(prob, FBDF(autodiff=false), initializealg = ShampineCollocationInit())
376+
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
377377
@test SciMLBase.successful_retcode(sol)
378378
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
379379
nothing # hide

0 commit comments

Comments
 (0)