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

  • The output may be multiplied with (-1) in order to use the output to control an outflow.

  • See [6, p. 30] or Jim Hines' Molecules of Structure website (→Close Gap) for more details on the use of this structure within system dynamics.

Parameters

TypeNameDefaultDescription
TimeadjTime1Time to close the gap
OutputTypemaxRateinfMaximum rate feasible
OutputTypeminRate0Minimum rate feasible
Structural Parameters
BooleanhasConstantAdjTimetrue= true, if the time to close the gap is a constant paramater
BooleaninvertOutputfalse= true, if the output is to be multiplied with (-1)
BooleanclipOutputfalse= true, if the indicated rate is to clipped to not exceed limitations
Advanced
Booleanstricttrue= true, if strict limits with noEvent(..) (constantLimiter.strict) (clip1.strict)
LimiterHomotopyhomotopyTypeLimiterHomotopy.LinearSimplified model for homotopy-based initialization (clip1.homotopyType)

Connectors

TypeNameDefaultDescription
Interfaces.Connectors.RealInputu_referenceDesired or reference value for the controlled quantity (i.e., the goal)
Interfaces.Connectors.RealInputu_currentCurrent value of controlled quantity
Interfaces.Connectors.RealInputu_adjTimeTime to close the gap

Components

TypeNameDefaultDescription
RealOutputy (from Policy_SO)Policy output signal
ModelSettingsmodelSettings