How to use level to calculate annual value

Use this forum to post Vensim related questions.
Post Reply
kong17
Senior Member
Posts: 60
Joined: Wed May 30, 2018 1:12 pm
Vensim version: PRO

How to use level to calculate annual value

Post by kong17 »

Hi, everyone

From the literature, I see that many people use integration to calculate annual profits
Looks like:
equation.png
equation.png (6.62 KiB) Viewed 3151 times
Because I used discrete points to calculate daily profits, and then accumulate annual profits.
But the more discrete points are set, the more troublesome the model becomes.
Therefore, I want to try to use continuous points to calculate the annual profit.
When using the level variable to model profit, it is a cumulative profit and requires an initial value.
I was wondering is it possible calculate the annual profit without requiring the initial annual profit?
I uploaded this simple model
Thank you for your help.

simple model.mdl
(6.8 KiB) Downloaded 154 times
Administrator
Super Administrator
Posts: 4590
Joined: Wed Mar 05, 2003 3:10 am

Re: How to use level to calculate annual value

Post by Administrator »

You can enter zero as the initial value of the profit. Have you tried that?
Advice to posters seeking help (it really helps us to help you)
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391

Units are important!
http://www.bbc.co.uk/news/magazine-27509559
kong17
Senior Member
Posts: 60
Joined: Wed May 30, 2018 1:12 pm
Vensim version: PRO

Re: How to use level to calculate annual value

Post by kong17 »

Administrator wrote: Mon Oct 12, 2020 1:30 pm You can enter zero as the initial value of the profit. Have you tried that?
The current model enter zero as the initial value of the profit.
It could work, but, the profits are always accumulating.
and what I hope to calculate is annual profit. For example, the annual profit in the first year is 50, the annual profit in the second year is 55, and the annual profit in the third year is 45.
Now, the calculation of profit in the model is that the first year is 50, in the second year is 105, in the third year is 150.
tomfid
Administrator
Posts: 3811
Joined: Wed May 24, 2006 4:54 am

Re: How to use level to calculate annual value

Post by tomfid »

1. The equation above from the lit gives cumulative profits, not annual profits. For annual profits, you need an outflow of profit from a year ago.

Typically, I use something like:

profit = revenue - expenses
previous profit = DELAY FIXED( profit, one year, 0 )
annual profit = INTEG(profit-previous profit, 0)

2. Even in simple models, you should use units. I suspect the *7*24 in your expression are days/week and hrs/day, and that the implicit units will cause problems. The details of units for my suggestion above are important, but will vary some depending on the model time settings.
kong17
Senior Member
Posts: 60
Joined: Wed May 30, 2018 1:12 pm
Vensim version: PRO

Re: How to use level to calculate annual value

Post by kong17 »

tomfid wrote: Mon Oct 12, 2020 1:57 pm 1. The equation above from the lit gives cumulative profits, not annual profits. For annual profits, you need an outflow of profit from a year ago.

Typically, I use something like:

profit = revenue - expenses
previous profit = DELAY FIXED( profit, one year, 0 )
annual profit = INTEG(profit-previous profit, 0)

2. Even in simple models, you should use units. I suspect the *7*24 in your expression are days/week and hrs/day, and that the implicit units will cause problems. The details of units for my suggestion above are important, but will vary some depending on the model time settings.
Yes, I agree with. Don't ignore the details just becaue it is a simple model.
I have double checked the literture. It is my mistake.
Acutally, the equation is to calcuate the operation profit by the price and marginal generation cost.
So according to the formula, what I actually want to calculate is the annual operating profit
Following your suggestion, I have modified the model.
But the result has not changed. (For simplicity, I tried to set the time step to 1, but after the operation, the operation profit and the annual operation profit are the same, only the time is delayed)
Is there a problem with the setting?
simple model.mdl
(7.46 KiB) Downloaded 151 times
tomfid
Administrator
Posts: 3811
Joined: Wed May 24, 2006 4:54 am

Re: How to use level to calculate annual value

Post by tomfid »

The problem is that you're using the cumulative profit (operation profit = INTEG(a-b,0)) rather than the current profit as the input to the structure I suggested.
tomfid
Administrator
Posts: 3811
Joined: Wed May 24, 2006 4:54 am

Re: How to use level to calculate annual value

Post by tomfid »

Adding units would reveal the issue, because current profit ~ $/year, whereas cumulative profit ~ $.
LAUJJL
Senior Member
Posts: 1427
Joined: Fri May 23, 2003 10:09 am
Vensim version: DSS

Re: How to use level to calculate annual value

Post by LAUJJL »

Hi Kong17

As a client, the administrators are kind enough to study your model. But as you are not a client of mine, I can advise that before wanting to do sophisticated things, you should first learn simple but mandatory ones.
Put on the settings unit, the use strict testing to on, and put dimensions for every variable of your model, avoiding DMNL if possible. If you want to do serious modelling this is mandatory. Of course if you just want to play with a model, you can do anything; it will not hurt anybody.
Best regards.
JJ
Post Reply