## Seeking Help with Modeling Multiple Payment Cycles Using a Single Variable in Vensim

Use this forum to discuss any issues relating to Systems Dynamics and Systems Thinking.
neeraj.bhanot.npl
Newbie
Posts: 1
Joined: Thu Sep 05, 2024 9:31 am
Vensim version: PLE

### Seeking Help with Modeling Multiple Payment Cycles Using a Single Variable in Vensim

I am working on a scenario in Vensim but facing some issues:

Payment Cycle: 3 Years

Average Cost: Rs 10

Further, I have simplified the scenario by assuming that the "Number of Clients" increases over time, where at Time = 0, No. of Clients = 0; at Time = 1, No. of Clients = 1; at Time = 2, No. of Clients = 2, and so on.

The expenditure is based on the above such that each year, the corresponding number of clients will make payments for 3 years, and their costs will be calculated as follows:

Expenditure = Number of Clients × Average Cost
It can be summarized considering the payment cycle:

| Year | Number of Clients | Expenditure |
|------|-------------------|-------------|
| 1 | 1 | 1 × 10 |
| 2 | 2 | 1 × 10 + 2 × 10 |
| 3 | 3 | 1 × 10 + 2 × 10 + 3 × 10 |
| 4 | 4 | 2 × 10 + 3 × 10 + 4 × 10 |
| 5 | 5 | 3 × 10 + 4 × 10 + 5 × 10 |
| 6 | 6 | 4 × 10 + 5 × 10 + 6 × 10 |
| 7 | 7 | 5 × 10 + 6 × 10 + 7 × 10 |
| 8 | 8 | 6 × 10 + 7 × 10 + 8 × 10 |
| 9 | 9 | 7 × 10 + 8 × 10 + 9 × 10 |
| 10 | 10 | 8 × 10 + 9 × 10 + 10 × 10 |

The issue arises when I try to model this in Vensim. If I create separate auxiliary variables for each of the three payment cycles and use the `DELAY FIXED` function, I get the correct result. However, if I try to combine all three payment cycles into a single variable and directly implement the `DELAY FIXED` function for all, I encounter errors.

Since I have different model cycles and stages in my actual model, it is not feasible for me to create separate variables for each payment cycle. I would be grateful if anyone could help me implement a solution that avoids defining multiple variables for each payment cycle and instead uses a single variable for expenditure values of each year.