.BusinessSimulation.Converters.ZeroIfNegative

Information

This information is part of the Business Simulation Library (BSL). Please support this work and ► donate.

The output y will be identical with the input u whenever u is greater than or equal to zero. It will be zero in all other cases.

Implementation

In the default setting (strict = false) in the Advanced tab, nonnegativity will be strictly ovserved:

  if strict then
    y = noEvent(if u < 0 then 0 else u);
  else
    y = smooth(0, if u < 0 then 0 else u);
  end if;

See also

ClipClipProcessTime

Revisions


Generated at 2024-11-22T19:25:38Z by OpenModelicaOpenModelica 1.24.2 using GenerateDoc.mos