Account

Basic model of an account with optional interest

Diagram

Information

This information is part of the Business Simulation Library (BSL). Please support this work and ► donate.

The output y reports the balance of an account that is increased or decreased by flows connected to the stock ports or at given rates (u_plus and u_minus respectively) if hasRateInputs = true. When there are interest payments (withInterest = true) positive and negative balances of the account will lead to interest earned and interest paid, respectively. The associated fractional rates can be given either as constants or as variable inputs.

Notes

  • Usually rates for deposits and withdrawals are given as separate, positive inputs. Using hasNetRateInput = true the rate of flow for the account can be given as a netRate using the connector u_plus only.

  • Fractional rates are assumed to be continuously compounding rates (→ForceOfInterest).

  • The Account is a more general structure than the widely known bathtub [6, pp.10f.]

See also

Reservoir

Parameters (9)

initialBalance

Value: 0

Type: OutputType

Description: Initial balance of the account

interestRatePlus

Value: unspecified

Type: Rate (1/s)

Description: Constant fractional interest rate for positive balances (optional)

interestRateMinus

Value: unspecified

Type: Rate (1/s)

Description: Constant fractional interest rate for negative balances (optional)

hasRateInputs

Value: true

Type: Boolean

Description: = true, if input connectors should allow giving transaction rates increasing/decreasing the balance of the account

hasNetRateInput

Value: false

Type: Boolean

Description: = true, if the rate of flow is given a net rate (u_plus only)

withInterest

Value: false

Type: Boolean

Description: = true, if positive and negative balances lead to interest earned or paid

hasConstantInterest

Value: true

Type: Boolean

Description: = true, if the optional interest rates are given as constant parameters

init

Value: modelSettings.init

Type: InitializationOptions

Description: Provide InitializationOptions (Free, FixedValue, SteadyState) (accountBalance.init)

strict

Value: true

Type: Boolean

Description: = true, if strict limits with noEvent(..) (positiveBalance.strict)

Connectors (9)

inflow

Type: StockPort

Description: Increasing the balance of the account

outflow

Type: StockPort

Description: Decreasing the balance of the account

u_plus

Type: RealInput

Description: Rate of inflow increasing the account (or net rate of flow)

u_minus

Type: RealInput

Description: Rate of outflow decreasing the account

u_interestPlus

Type: RealInput

Description: Fractional interest rate for positive balances (optional)

u_interestMinus

Type: RealInput

Description: Fractional interest rate for negative balances (optional)

y_intEarned

Type: RealOutput

Description: Interest earned (optional)

y_intPaid

Type: RealOutput

Description: Interest paid (optional)

y

Type: RealOutput

Description: Balance of the account (e.g., amount in the stock)

Components (15)

modelSettings

Type: ModelSettings

Description: Setting important global variables within a model

accountBalance

Type: InformationLevel

Description: Balance of the account

netFlow

Type: ExogenousChange

Description: Net flow to or from the account

negativeRate

Type: Gain

Description: The rate of decrease is turned into a negative rate

netRate

Type: Add_2

Description: Net rate of flow

netRateInput

Type: PassThrough

Description: Input u_plus net rate of flow

interestPlus

Type: ConstantConverter

Description: Constant rate of interest for positive balances

interestMinus

Type: ConstantConverter

Description: Constant rate of interest for negative balances

positiveBalance

Type: ZeroIfNegative

Description: Positive balance or zero

negativeBalance

Type: ZeroIfNegative

Description: Negative balance or zero

invertedBalance

Type: Gain

Description: Input is multiplied by constant parameter

rateDecline

Type: Product_2

Description: Rate of decline

interestPaid

Type: Decline

Description: Interest decreasing the balance

interestEarned

Type: Growth

Description: Interest payments increasing the balance

rateIncrease

Type: Product_2

Description: Rate of decline