MinVal

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 f ( q ( t ) ) MathType@MTEF@5@5@+= feaagKart1ev2aaatCvAUfeBSjuyZL2yd9gzLbvyNv2CaerbuLwBLn hiov2DGi1BTfMBaeXatLxBI9gBaebbnrfifHhDYfgasaacH8srps0l bbf9q8WrFfeuY=Hhbbf9v8qiqrFr0xc9pk0xbba9q8WqFfea0=yr0R Yxir=Jbba9q8aq0=yq=He9q8qqQ8frFve9Fve9Ff0dmeGabeqadiWa ceGabeqabeqadeqadeaakeaacaWGMbWaaeWaaeaacaWGXbGaaiikai aadshacaGGPaaacaGLOaGaayzkaaaaaa@37B3@ satisfies the following condition: If T* is the point in time when is f ( q ( t ) ) MathType@MTEF@5@5@+= feaagKart1ev2aaatCvAUfeBSjuyZL2yd9gzLbvyNv2CaerbuLwBLn hiov2DGi1BTfMBaeXatLxBI9gBaebbnrfifHhDYfgasaacH8srps0l bbf9q8WrFfeuY=Hhbbf9v8qiqrFr0xc9pk0xbba9q8WqFfea0=yr0R Yxir=Jbba9q8aq0=yq=He9q8qqQ8frFve9Fve9Ff0dmeGabeqadiWa ceGabeqabeqadeqadeaakeaacaWGMbWaaeWaaeaacaWGXbGaaiikai aadshacaGGPaaacaGLOaGaayzkaaaaaa@37B3@ minimum, then f ( q ( T * ) ) f ( q ( t ) ) MathType@MTEF@5@5@+= feaagKart1ev2aaatCvAUfeBSjuyZL2yd9gzLbvyNv2CaerbuLwBLn hiov2DGi1BTfMBaeXatLxBI9gBaebbnrfifHhDYfgasaacH8srps0l bbf9q8WrFfeuY=Hhbbf9v8qiqrFr0xc9pk0xbba9q8WqFfea0=yr0R Yxir=Jbba9q8aq0=yq=He9q8qqQ8frFve9Fve9Ff0dmeGabeqadiWa ceGabeqabeqadeqadeaakeaacaWGMbWaaeWaaeaacaWGXbGaaiikai aadsfacaGGQaGaaiykaaGaayjkaiaawMcaaiabgwMiZkaadAgadaqa daqaaiaadghacaGGOaGaamiDaiaacMcaaiaawIcacaGLPaaaaaa@3FC3@ 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:(1)
M i n v a l ( x ) = 0 T x ( t )   e a x ( t )   d t 0 T e a x ( t )   d t MathType@MTEF@5@5@+= feaagKart1ev2aqatCvAUfeBSjuyZL2yd9gzLbvyNv2CaerbdfwBIj xAHbstHrhAaerbuLwBLnhiov2DGi1BTfMBaeXafv3ySLgzGmvETj2B SbqeeuuDJXwAKbsr4rNCHbGeaGqiVu0Je9sqqrpepC0xbbL8F4rqqr Ffpeea0xe9Lq=Jc9vqaqpepm0xbba9pwe9Q8fs0=yqaqpepae9pg0F irpepeKkFr0xfr=xfr=xb9adbaGaaiGadmWaamaaciGaaeWaceabca GcqqaaaaaaOpGqSvxza8qabaGaamytaiaadggacaWG4bGaamODaiaa dggacaWGSbGaaiikaiaadIhacaGGPaGaeyypa0ZaaSaaaeaadaWdXa qaaiaadIhacaGGOaGaamiDaiaacMcacaqGGaGaamyzamaaCaaaleqa baGaamyyaiaadIhacaGGOaGaamiDaiaacMcaaaGccaqGGaGaamizai aadshaaSqaaiaaicdaaeaacaWGubaaniabgUIiYdaakeaadaWdXaqa aiaadwgadaahaaWcbeqaaiaadggacaWG4bGaaiikaiaadshacaGGPa aaaOGaaeiiaiaadsgacaWG0baaleaacaaIWaaabaGaamivaaqdcqGH RiI8aaaaaaa@611A@
The parameter a < 0 MathType@MTEF@5@5@+= feaagKart1ev2aqatCvAUfeBSjuyZL2yd9gzLbvyNv2CaerbdfwBIj xAHbstHrhAaerbuLwBLnhiov2DGi1BTfMBaeXafv3ySLgzGmvETj2B SbqeeuuDJXwAKbsr4rNCHbGeaGqiVu0Je9sqqrpepC0xbbL8F4rqqr Ffpeea0xe9Lq=Jc9vqaqpepm0xbba9pwe9Q8fs0=yqaqpepae9pg0F irpepeKkFr0xfr=xfr=xb9adbaGaaiGadmWaamaaciGaaeWaceabca GcbaGaamyyaiabgYda8iaaicdaaaa@3D0A@ is used to control the accuracy of the calculations.
Note: M i n ( x ) = lim M i n v a l ( x ) MathType@MTEF@5@5@+= feaagKart1ev2aqatCvAUfeBSjuyZL2yd9gzLbvyNv2CaerbdfwBIj xAHbstHrhAaerbuLwBLnhiov2DGi1BTfMBaeXafv3ySLgzGmvETj2B SbqeeuuDJXwAKbsr4rNCHbGeaGqiVu0Je9sqqrpepC0xbbL8F4rqqr Ffpeea0xe9Lq=Jc9vqaqpepm0xbba9pwe9Q8fs0=yqaqpepae9pg0F irpepeKkFr0xfr=xfr=xb9adbaGaaiGadmWaamaaciGaaeWaceabca GcbaGaaeytaiaabggacaqG4bGaaiikaiaabIhacaGGPaGaeyypa0Za aCbeaeaaciGGSbGaaiyAaiaac2gaaSqaaiaadggacqGHsgIRcqGHEi sPaeqaaOGaamytaiaadggacaWG4bGaamODaiaadggacaWGSbGaaiik aiaadIhacaGGPaaaaa@4FA3@ .

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))