blockZeroIfNegative

The input will be set to zero, if it is negative

Extends from Interfaces.PartialConverters.SISO (Converter with single input and single output).

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

Parameters

TypeNameDefaultDescription
Advanced
Booleanstricttrue= true, if strict limits with noEvent(..)

Connectors

TypeNameDefaultDescription
Connectors.RealInputu (from SISO)Input

Components

TypeNameDefaultDescription
RealOutputy (from SO)

Revisions

  • updated in v2.0.0