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
Parameters
| Type | Name | Default | Description |
|---|---|---|---|
| Advanced | |||
| Boolean | strict | true | = true, if strict limits with noEvent(..) |
Connectors
| Type | Name | Default | Description |
|---|---|---|---|
| Connectors.RealInput | u (from SISO) | Input |
Components
| Type | Name | Default | Description |
|---|---|---|---|
| RealOutput | y (from SO) |
Revisions
- updated in v2.0.0