You are here

Simple bank account model

The model: a simple bank account

Next Step >>

We will make a model for a simple bank account, with interest paid annually at a rate of 10%, and $10 taken out every year. The account initially contains $300. This is what we expect to happen:

Year 1

Opening balance

$300.00

     

Interest paid in

 

$30.00

 

0.1 x 300

Withdrawal    

$10.00

 

Closing balance

$320.00

   

300 + 30 - 10

Year 2

Opening balance

$320.00

     

Interest paid in

 

$32.00

 

0.1 x 320

Withdrawal    

$10.00

 

Closing balance

$342.00

   

320 + 32 - 10

Year 3

Opening balance

$342.00

     

Interest paid in

 

$34.20

 

0.1 x 342

Withdrawal    

$10.00

 

Closing balance

$366.20

   

342 + 34.2 - 10

And so on. Note that the increments are getting bigger each year because each time the balance goes up, so the interest paid increases. The balance of the bank account is increasing at a faster and faster rate.

Having understood the calculations that we are going to perform, we now turn to the concepts needed to express these ideas in Simile.

We use a compartment to represent the amount of money held in the bank account, since this a quantity that changes incrementally over time. We use two flows, one to represent the gain of money from interest and the other to represent the loss of money by withdrawal. One flow (interest) will go into the compartment, while the other flow (withdrawal) will come out of the compartment. We will also use a variable to represent the interest rate (10%, or 0.1). This variable will be linked to the flow representing the payment of interest by an influence arrow, indicating that the amount of interest paid depends on the interest rate. Since the amount of interest paid also depends on the amount in the bank account, there we will also use an influence arrow from the compartment representing the bank account to this flow.

In this tutorial we want to introduce you mainly to the mechanics of working with Simile, and these are explained in detail in the following steps. The concepts involved in representing even a simple system like this one in a modelling language can be quite complex.

Next Step >>