blockSampleIfTrue
Samples input, if Boolean trigger is true
Extends from Interfaces.PartialConverters.SmoothSISO (Smooth-like converter), Icons.DiscreteSmoothLabel (Mark converters as discrete).
Information
This information is part of the Business Simulation Library (BSL). Please support this work and ► donate.
The (discrete) output y is sampled from the input u whenever the Boolean input trigger becomes true.
Notes
- The parameter
initin the Advanced tab allows to select →InitializationOptions:
- FixedValue (default) will use the parameter
initialValueto determine the initial output y to be given before the sampling starts. - SteadyState will set the initial output y equal to the initial input u.
- Free there will be no initial equation and thus the solver is free to find an initial output using
initialValueas an initial guess.
- FixedValue (default) will use the parameter
See also
Parameters
| Type | Name | Default | Description |
|---|---|---|---|
| OutputType | initialValue | 0 | Initial Value to be reported before sampling starts |
| Advanced | |||
| InitializationOptions | init | modelSettings.init | Provide InitializationOptions (Free, FixedValue, SteadyState) |
Connectors
| Type | Name | Default | Description |
|---|---|---|---|
| Connectors.RealInput | u (from SmoothSISO) | Input | |
| Interfaces.Connectors.BooleanInput | trigger | Triggers sampling upon `true` |
Components
| Type | Name | Default | Description |
|---|---|---|---|
| RealOutput | y (from SmoothSISO) | ||
| ModelSettings | modelSettings |