modelAccount

Basic model of an account with optional interest

Extends from Icons.SubsystemIncubator (General Icon for stocks), Interfaces.Basics.OutputTypeChoice (Partial model to set output type).

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

TypeNameDefaultDescription
StringiconLabel (from SubsystemIncubator)""
OutputTypeinitialBalance0Initial balance of the account
RateinterestRatePlusunspecifiedConstant fractional interest rate for positive balances (optional)
RateinterestRateMinusunspecifiedConstant fractional interest rate for negative balances (optional)
Structural Parameters
BooleanhasRateInputstrue= true, if input connectors should allow giving transaction rates increasing/decreasing the balance of the account
BooleanhasNetRateInputfalse= true, if the rate of flow is given a net rate (u_plus only)
BooleanwithInterestfalse= true, if positive and negative balances lead to interest earned or paid
BooleanhasConstantInteresttrue= true, if the optional interest rates are given as constant parameters
Advanced
InitializationOptionsinitmodelSettings.initProvide InitializationOptions (Free, FixedValue, SteadyState) (accountBalance.init)
Booleanstricttrue= true, if strict limits with noEvent(..) (positiveBalance.strict)

Connectors

TypeNameDefaultDescription
Interfaces.Connectors.StockPortinflowIncreasing the balance of the account
Interfaces.Connectors.StockPortoutflowDecreasing the balance of the account
Interfaces.Connectors.RealInputu_plusRate of inflow increasing the account (or net rate of flow)
Interfaces.Connectors.RealInputu_minusRate of outflow decreasing the account
Interfaces.Connectors.RealInputu_interestPlusFractional interest rate for positive balances (optional)
Interfaces.Connectors.RealInputu_interestMinusFractional interest rate for negative balances (optional)

Components

TypeNameDefaultDescription
RealOutputy_intEarnedInterest earned (optional)
RealOutputy_intPaidInterest paid (optional)
RealOutputyBalance of the account (e.g., amount in the stock)
ModelSettingsmodelSettings