Hi,
My model simulates electricty market hourly from 2015-2050 for different countries. So it produces hourly price for each year. I was wondering how can I extract median electricity price per year? My regional price for every hour is as follows:
Regional Price this hour[EndUse Region]= INTEG (
price change this hour to next[EndUse Region],
Init Price[EndUse Region])
Units: eurocent/(KW*Hour)
A question about calculating median
Re: A question about calculating median
You can report the median with the Stats tool.
If you need it dynamically, you store values in an array and use the VECTOR SORT-type functions to find the midpoint.
If you need it dynamically, you store values in an array and use the VECTOR SORT-type functions to find the midpoint.
/*
Advice to posters (it really helps us to help you)
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391
Blog: http://blog.metasd.com
Model library: http://models.metasd.com
Bookmarks: http://delicious.com/tomfid/SystemDynamics
*/
Advice to posters (it really helps us to help you)
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391
Blog: http://blog.metasd.com
Model library: http://models.metasd.com
Bookmarks: http://delicious.com/tomfid/SystemDynamics
*/
Re: A question about calculating median
I want to use second method but I get error yet. My hourly price is a stock and its flow is price change this to next hour. Can you please update medain of VECTOR SORT example in a way that values should be stored in an array and ranked after one time period (e.g. one year).
Re: A question about calculating median
If you're running with a 1-hr time step, this will be VERY expensive computationally, because you'll be sorting an array of 8760 values every time step.
If the time step is larger, and the hour dimension is already in an array, it might work.
If the time step is larger, and the hour dimension is already in an array, it might work.
/*
Advice to posters (it really helps us to help you)
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391
Blog: http://blog.metasd.com
Model library: http://models.metasd.com
Bookmarks: http://delicious.com/tomfid/SystemDynamics
*/
Advice to posters (it really helps us to help you)
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391
Blog: http://blog.metasd.com
Model library: http://models.metasd.com
Bookmarks: http://delicious.com/tomfid/SystemDynamics
*/
Re: A question about calculating median
Yes, I am running with a 1-hr time step for 35 years and it makes it challenging for storing median price.
Re: A question about calculating median
How often do you need to update it? There might be a way to create a function to access it occasionally (e.g., monthly updates), so that the load is lower.
Is there some other robust statistic that would work?
Is there some other robust statistic that would work?
/*
Advice to posters (it really helps us to help you)
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391
Blog: http://blog.metasd.com
Model library: http://models.metasd.com
Bookmarks: http://delicious.com/tomfid/SystemDynamics
*/
Advice to posters (it really helps us to help you)
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391
Blog: http://blog.metasd.com
Model library: http://models.metasd.com
Bookmarks: http://delicious.com/tomfid/SystemDynamics
*/
Re: A question about calculating median
Yearly. I want to report yearly median price of electricity for 14 regions in Europe.