File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change 314314const ReLUSpring{T, C} = RectifiedSpring{T, C}
315315ReLUSpring (args... ;kwargs... ) = RectifiedSpring (args... ; kwargs... )
316316
317+ """
318+ add_deadzone_springs!(mechanism, stiffness, bounds, coord_id)
319+
320+ Creates a spring with a deadzone, that acts with stiffness `stiffness` outside of
321+ bounds `bounds`, e.g. (-1.0, 1.0), on the coordinate `coord_id`.
322+
323+ The deadzone is implemented as two ReLU springs on two new coordinates, which are
324+ offset from the original coordinate by the bounds. This is because the ReLU spring
325+ is centered at zero, so the new coordinates are used to shift the 'zero point' to
326+ match the bounds.
327+ """
317328function add_deadzone_springs! (mechanism, stiffness, bounds, coord_id)
318329 lb, ub = bounds
319330 lb_coord_id = add_coordinate! (mechanism, ConstCoord (lb); id= " lb_$coord_id " )
You can’t perform that action at this time.
0 commit comments