Page 1 of 1
How to use level to calculate annual value
Posted: Mon Oct 12, 2020 1:25 pm
by kong17
Hi, everyone
From the literature, I see that many people use integration to calculate annual profits
Looks like:

- equation.png (6.62 KiB) Viewed 6423 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.
Re: How to use level to calculate annual value
Posted: Mon Oct 12, 2020 1:30 pm
by Administrator
You can enter zero as the initial value of the profit. Have you tried that?
Re: How to use level to calculate annual value
Posted: Mon Oct 12, 2020 1:44 pm
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.
Re: How to use level to calculate annual value
Posted: Mon Oct 12, 2020 1:57 pm
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.
Re: How to use level to calculate annual value
Posted: Mon Oct 12, 2020 3:48 pm
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?
Re: How to use level to calculate annual value
Posted: Mon Oct 12, 2020 4:07 pm
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.
Re: How to use level to calculate annual value
Posted: Mon Oct 12, 2020 4:19 pm
by tomfid
Adding units would reveal the issue, because current profit ~ $/year, whereas cumulative profit ~ $.
Re: How to use level to calculate annual value
Posted: Tue Oct 13, 2020 8:51 am
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