blockCloseGap
Determine the rate of flow (action) to close a gap between a quantity and its desired value
Extends from Interfaces.PartialConverters.Policy_SO (Policy Block (Decision Making/Controller)).
Information
This information is part of the Business Simulation Library (BSL). Please support this work and ► donate.
The output y is given by the expression:
y = (u_reference - u_current) / u_adjTime
where the time to close the gap (u_adjTime) can alternatively be a constant (adjTime). If the adjustement time is zero, then the output y will be zero as well.
Limitations
- The adjustment time must not be negative. Negative values will be caught by an assert statement and will cause the simulation to stop.
- Catching a division by zero (e.g., adjustement time is zero) by returning a zero output will not be an adequate structure if some kind of discrete behavior is what is wanted: Adjustement time being zero may then mean that the stock should change immediately which usually only makes sense at defined events. If such discrete behavior is intended this structure should not be used.
Notes
Parameters
| Type | Name | Default | Description |
|---|---|---|---|
| Time | adjTime | 1 | Time to close the gap |
| OutputType | maxRate | inf | Maximum rate feasible |
| OutputType | minRate | 0 | Minimum rate feasible |
| Structural Parameters | |||
| Boolean | hasConstantAdjTime | true | = true, if the time to close the gap is a constant paramater |
| Boolean | invertOutput | false | = true, if the output is to be multiplied with (-1) |
| Boolean | clipOutput | false | = true, if the indicated rate is to clipped to not exceed limitations |
| Advanced | |||
| Boolean | strict | true | = true, if strict limits with noEvent(..) (constantLimiter.strict) (clip1.strict) |
| LimiterHomotopy | homotopyType | LimiterHomotopy.Linear | Simplified model for homotopy-based initialization (clip1.homotopyType) |
Connectors
| Type | Name | Default | Description |
|---|---|---|---|
| Interfaces.Connectors.RealInput | u_reference | Desired or reference value for the controlled quantity (i.e., the goal) | |
| Interfaces.Connectors.RealInput | u_current | Current value of controlled quantity | |
| Interfaces.Connectors.RealInput | u_adjTime | Time to close the gap |
Components
| Type | Name | Default | Description |
|---|---|---|---|
| RealOutput | y (from Policy_SO) | Policy output signal | |
| ModelSettings | modelSettings |