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:

Opening balance |
$300.00 |
|||

Interest paid in |
$30.00 |
0.1 x 300 |
||

Withdrawal |
$10.00 |
|||

Closing balance |
$320.00 |
300 + 30 - 10 |

Opening balance |
$320.00 |
|||

Interest paid in |
$32.00 |
0.1 x 320 |
||

Withdrawal |
$10.00 |
|||

Closing balance |
$342.00 |
320 + 32 - 10 |

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.

- Printer-friendly version
- Log in or register to post comments