Motion profile acceleration constraint.
Returns the maximum profile velocity at displacement s using ds and lastVel.