Transform annual data into monthly cumulative data
Transform annual data into monthly cumulative data
I have an input variable (Demand) that is given every 15 minutes for 12 months and I need to gather this data of 15 minutes in 1 hour to get the consumption, I need between annual data and that are presented monthly, the objective is to get the Value of the monthly energy bill that is the result of the sum of consumption multiplied by the consumption rate and demand multiplied by the demand rate, how can I do that?
-
- Super Administrator
- Posts: 4610
- Joined: Wed Mar 05, 2003 3:10 am
Re: Transform annual data into monthly cumulative data
I don't really follow what you are asking, but it sounds like a job for Excel.
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
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391
Units are important!
http://www.bbc.co.uk/news/magazine-27509559
Re: Transform annual data into monthly cumulative data
At first, the demand is an initial variable, after it is reduced as a function of a generator of energy that is inserted in the system, where the feedback is present generating a new variable of demand and another of consumption, for that reason I have to do this in Vensim . I need to know the function that does and displays the average for every 4 data and also if it is possible to make an accumulator that in a certain period is zeroed and starts counting again.
-
- Super Administrator
- Posts: 4610
- Joined: Wed Mar 05, 2003 3:10 am
Re: Transform annual data into monthly cumulative data
ok. This was not clear in your initial question.Priscila wrote:At first, the demand is an initial variable, after it is reduced as a function of a generator of energy that is inserted in the system, where the feedback is present generating a new variable of demand and another of consumption, for that reason I have to do this in Vensim .
Does this help?Priscila wrote:I need to know the function that does and displays the average for every 4 data
http://www.vensim.com/documentation/ind ... _trend.htm
Use a level and empty it using level/time step when you want it zeroed.Priscila wrote:and also if it is possible to make an accumulator that in a certain period is zeroed and starts counting again.
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
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391
Units are important!
http://www.bbc.co.uk/news/magazine-27509559
Re: Transform annual data into monthly cumulative data
Use a level and empty it using the level / time step when you want it to be zeroed.
Could you give me an example?
Could you give me an example?
-
- Super Administrator
- Posts: 4610
- Joined: Wed Mar 05, 2003 3:10 am
Re: Transform annual data into monthly cumulative data
Code: Select all
some level = integ (inflow - outflow - reset level, initial stock)
reset level = if then else ( time = 10 , some level / time step , 0 )
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
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391
Units are important!
http://www.bbc.co.uk/news/magazine-27509559
Re: Transform annual data into monthly cumulative data
That way I can show the values at each time interval, every 10, but I can not reset the accumulator. I need, for example, to add from 0 to 10, to zero the count add from 11 to 22 and so on and show on the same variable.
Re: Transform annual data into monthly cumulative data
Does the vensim software contain no more than 8000 data in tabular form?
-
- Super Administrator
- Posts: 4610
- Joined: Wed Mar 05, 2003 3:10 am
Re: Transform annual data into monthly cumulative data
I think this would be much easier if you upload the model you are working on so we can see. I'm really struggling to understand what you are trying to do.Priscila wrote:That way I can show the values at each time interval, every 10, but I can not reset the accumulator. I need, for example, to add from 0 to 10, to zero the count add from 11 to 22 and so on and show on the same variable.
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
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391
Units are important!
http://www.bbc.co.uk/news/magazine-27509559
-
- Super Administrator
- Posts: 4610
- Joined: Wed Mar 05, 2003 3:10 am
Re: Transform annual data into monthly cumulative data
Correct.Priscila wrote:Does the vensim software contain no more than 8000 data in tabular form?
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
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391
Units are important!
http://www.bbc.co.uk/news/magazine-27509559
Re: Transform annual data into monthly cumulative data
The variable invoice is the sum of demand (given every 15 minutes) times the tariff of demand + consumption (which is the sum of demand every 1 hour) times the consumption tariff ...
The consumption variable should be the average of the four demand values, so that the data every 15 minutes are transformed into hourly data. After these hourly data must be added every month, that is, they need to be accumulated from time 0 to time 2975, from time 2976 to time 5759 and so on until total sum of monthly consumptions.
Lastly, the invoice variable must be calculated monthly, that is, it accumulates until the time 2975, it zeroes and it begins to accumulate of the time 2976 until 5759, zera and begins to accumulate in 5760 until 8735 and so on.
There are a total of 14 months of simulation.
Also, after the simulation I need to transfer the data to excel, this is possible given that it is a total of 40800 data.
The consumption variable should be the average of the four demand values, so that the data every 15 minutes are transformed into hourly data. After these hourly data must be added every month, that is, they need to be accumulated from time 0 to time 2975, from time 2976 to time 5759 and so on until total sum of monthly consumptions.
Lastly, the invoice variable must be calculated monthly, that is, it accumulates until the time 2975, it zeroes and it begins to accumulate of the time 2976 until 5759, zera and begins to accumulate in 5760 until 8735 and so on.
There are a total of 14 months of simulation.
Also, after the simulation I need to transfer the data to excel, this is possible given that it is a total of 40800 data.
- Attachments
-
- etanol hard_anual1.mdl
- (22.53 KiB) Downloaded 5393 times
-
- Super Administrator
- Posts: 4610
- Joined: Wed Mar 05, 2003 3:10 am
Re: Transform annual data into monthly cumulative data
I cannot find a parameter called "invoice" in your model.
I think it might be better if you first try and follow some best practice on your model. It doesn't pass the most basic of tests (dimensional consistency), it's impossible for me to work out what the model is supposed to do or if any of the calculations are correct (what is demand even measured in?).
I think it might be better if you first try and follow some best practice on your model. It doesn't pass the most basic of tests (dimensional consistency), it's impossible for me to work out what the model is supposed to do or if any of the calculations are correct (what is demand even measured in?).
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
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391
Units are important!
http://www.bbc.co.uk/news/magazine-27509559
Re: Transform annual data into monthly cumulative data
I have a series of 9 data:
2
3
1
2
4
5
6
7
5
It is necessary to obtain in the vensim, the maximum value comparing every 3 intervals as follows:
0
0
3
0
0
5
0
0
7
How can I perform this operation
Also, how do I export the values obtained in a simulation with more than 8000 times
2
3
1
2
4
5
6
7
5
It is necessary to obtain in the vensim, the maximum value comparing every 3 intervals as follows:
0
0
3
0
0
5
0
0
7
How can I perform this operation
Also, how do I export the values obtained in a simulation with more than 8000 times
-
- Super Administrator
- Posts: 4610
- Joined: Wed Mar 05, 2003 3:10 am
Re: Transform annual data into monthly cumulative data
Where is the logic in this? Why are there zeros if you are calculating the maximum over 3 intervals?Priscila wrote:I have a series of 9 data:
2
3
1
2
4
5
6
7
5
It is necessary to obtain in the vensim, the maximum value comparing every 3 intervals as follows:
0
0
3
0
0
5
0
0
7
How can I perform this operation
Vensim documentation, search for export.Also, how do I export the values obtained in a simulation with more than 8000 times
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
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391
Units are important!
http://www.bbc.co.uk/news/magazine-27509559
Re: Transform annual data into monthly cumulative data
Administrator wrote: ↑Mon Jun 26, 2017 1:41 pmThis will reset the level at time = 10.Code: Select all
some level = integ (inflow - outflow - reset level, initial stock) reset level = if then else ( time = 10 , some level / time step , 0 )
Good Morning,
As above the variable is reset at time 10, how can I reset a variable with a fixed time, for example whenever I complete 30 days.
-
- Super Administrator
- Posts: 4610
- Joined: Wed Mar 05, 2003 3:10 am
Re: Transform annual data into monthly cumulative data
Do you have a variable that indicates when 30 days have elapsed? If yes,
reset level = if then else ( variable that indicates time has elapsed = 1 , some level / time step , 0 )
reset level = if then else ( variable that indicates time has elapsed = 1 , some level / time step , 0 )
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
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391
Units are important!
http://www.bbc.co.uk/news/magazine-27509559
Re: Transform annual data into monthly cumulative data
Working with energy demand data, this data is every 15 minutes, so every 2784 data I have a month, how can I create the variable that informs when one month ends and starts the other to be able to use the equation above and reset whenever ends a month.
-
- Super Administrator
- Posts: 4610
- Joined: Wed Mar 05, 2003 3:10 am
Re: Transform annual data into monthly cumulative data
Can you upload a sample of what you are working with and the model you are attempting to build? It's difficult to suggest an answer unless we can see what you have.
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
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391
Units are important!
http://www.bbc.co.uk/news/magazine-27509559
Re: Transform annual data into monthly cumulative data
The template is attached in the Fatura tab. To give continuity in the precise modeling find the maximum value of demand each month, represented by the variable Máxima demanda faturada Ponta, with one month being 2785 data each.
- Attachments
-
- Integração_Estudo de caso.mdl
- (28.21 KiB) Downloaded 5340 times
Re: Transform annual data into monthly cumulative data
Hello,
You have an answer, which function can I use.
You have an answer, which function can I use.
-
- Super Administrator
- Posts: 4610
- Joined: Wed Mar 05, 2003 3:10 am
Re: Transform annual data into monthly cumulative data
I've attached a model showing how to get a variable = 1 when a month is complete.
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
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391
Units are important!
http://www.bbc.co.uk/news/magazine-27509559
Re: Transform annual data into monthly cumulative data
Thank you so much, I was able to solve some of my problem.
One more question, it is possible to reset a SAMPLE IF TRUE variable
One more question, it is possible to reset a SAMPLE IF TRUE variable
-
- Super Administrator
- Posts: 4610
- Joined: Wed Mar 05, 2003 3:10 am
Re: Transform annual data into monthly cumulative data
You reset a sample if true by making the first argument to the function true.
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
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391
Units are important!
http://www.bbc.co.uk/news/magazine-27509559
Re: Transform annual data into monthly cumulative data
I need to find the maximum value of a variable every month, however using SAMPLE IF TRUE this variable is accumulated and this is not what I need. What function could I use, having the variable that tells me when it starts a new month.
-
- Super Administrator
- Posts: 4610
- Joined: Wed Mar 05, 2003 3:10 am
Re: Transform annual data into monthly cumulative data
The datedemo model I uploaded gives you a variable that is 1 when it's a new month, and zero at all other times.
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
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391
Units are important!
http://www.bbc.co.uk/news/magazine-27509559