Computes the minimum value of a user specified function, which could be a MotionSolve expression or a user subroutine.
The minimum value of a signal
satisfies the following condition: If T* is the
point in time when is
minimum, then
when t ≠T*. If
the expression has no minimum value, the initial value will be returned as the
minimum value.
A smooth approximation to the MIN function is implemented in
MotionSolve, so that its sensitivities are analytically
computed. The smooth approximation, known as the alpha soft approximation,
is:
The parameter
is used to control the accuracy of the calculations.
Note:
.
Example
Assume that you want to put a lower limit on the velocity of a vehicle.
Here is a code snippet that shows how the response should be defined with
MinVal:
>>> # Define the minimum of velocity
>>> minVel = MinVal(function = "VZ({},{})".format(p.cm.id,ref.id))