Allocation by Priority and Demand Values
Allocation by Priority and Demand Values
Hi, I am trying to model an energy investment process here where a proportion of GDP is allocated to investments in energy generating capacities. I was trying to use the Allocation by Priority function to portion the amount of GDP which requires a demand value. Using the basis of Stock Management Structure (Figure 17-6, pg. 676, Sterman 2000), I assumed that using the Desired Stock or perhaps the Indicated Orders would form the demand required for the Allocation by Priority equation but that runs into the simultaneous equation problem.
Could I get some guidance from mentors here who have had similar experiences on what should be the right way to think about this?
I am using the academic license of Vensim DSS.
Could I get some guidance from mentors here who have had similar experiences on what should be the right way to think about this?
I am using the academic license of Vensim DSS.
Re: Allocation by Priority and Demand Values
Oh nvm. Figured it out the issue. Thanks for creating the allocation by priority feature. Useful!
Re: Allocation by Priority and Demand Values
OK, nice 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: Allocation by Priority and Demand Values
Hello!
I was trying to use the FIND MARKET PRICE feature to model the market clearing price for the electricity market.
I got the following errors:
ALLOCATE_AVAILABLE/FIND_MARKET_PRICE = bad ptype error.
Floating point error computing - Market Clearing Priority - at time = 2010.0000
So the formula I used is:
FIND MARKET PRICE( "Input Demand [Total Demand] , Demand Curve[Total Demand,ptype] , Supply Available[Natural Gas Fired] , Supply Curve[Natural Gas Fired,ptype] )
For the supply available side, there are multiple suppliers but some of the technologies are not deployed yet, so they have 0 supply available at the start.
For the supply curve, I am using ptype 1, pwidth 0.001 for simplification. ppriority is based on the LCOE calculated for the different technology type.
For the demand curve, I am assuming inelastic demand so I used the simplification: 1,1,1,0.
I did try to follow the example i found in another forum thread that the admins posted but the error threw me off, so I am not sure what is going on here.
I was wondering if I could get some help on the error here? Thank you!
I was trying to use the FIND MARKET PRICE feature to model the market clearing price for the electricity market.
I got the following errors:
ALLOCATE_AVAILABLE/FIND_MARKET_PRICE = bad ptype error.
Floating point error computing - Market Clearing Priority - at time = 2010.0000
So the formula I used is:
FIND MARKET PRICE( "Input Demand [Total Demand] , Demand Curve[Total Demand,ptype] , Supply Available[Natural Gas Fired] , Supply Curve[Natural Gas Fired,ptype] )
For the supply available side, there are multiple suppliers but some of the technologies are not deployed yet, so they have 0 supply available at the start.
For the supply curve, I am using ptype 1, pwidth 0.001 for simplification. ppriority is based on the LCOE calculated for the different technology type.
For the demand curve, I am assuming inelastic demand so I used the simplification: 1,1,1,0.
I did try to follow the example i found in another forum thread that the admins posted but the error threw me off, so I am not sure what is going on here.
I was wondering if I could get some help on the error here? Thank you!
Re: Allocation by Priority and Demand Values
You might compare your version to the sample model in the Help system.
I think we can't diagnose this without more information - a model, or at least the relevant subscripts and related equations.
I think we can't diagnose this without more information - a model, or at least the relevant subscripts and related equations.
/*
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: Allocation by Priority and Demand Values
Thank you!
i did manage to get it to work, there was upstream information that required an initial value for it to work. I was wondering who can I can email my model to if I have further queries? The issue i am facing is that the SUPPLY AT PRICE function seems to not work quite right and I am not sure what exactly is the problem here.
i did manage to get it to work, there was upstream information that required an initial value for it to work. I was wondering who can I can email my model to if I have further queries? The issue i am facing is that the SUPPLY AT PRICE function seems to not work quite right and I am not sure what exactly is the problem here.
-
- Super Administrator
- Posts: 4832
- Joined: Wed Mar 05, 2003 3:10 am
Re: Allocation by Priority and Demand Values
Please upload your model to the forum if you have further queries.
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: Allocation by Priority and Demand Values
Or email us.
What are the symptoms of not working quite right? This has been tested and used extensively, so a bug is possible but unlikely.
What are the symptoms of not working quite right? This has been tested and used extensively, so a bug is possible but unlikely.
/*
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: Allocation by Priority and Demand Values
Hi,
Thanks for the information. I have attached my model for discussion here. The Find Market Price portion can be found in the Pricing view.
Thank you!!
Thanks for the information. I have attached my model for discussion here. The Find Market Price portion can be found in the Pricing view.
Thank you!!
- Attachments
-
- Electricity Market.mdl
- (169.74 KiB) Downloaded 1277 times
Re: Allocation by Priority and Demand Values
What is the problem symptom?
/*
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: Allocation by Priority and Demand Values
I am not sure if I am doing it right but the amount supplied variable that I am getting is not showing what I would be expecting, where its total is supposed to be input demand. Since the input demand should match amount supplied in the scenario, where there is clearly a case where there is an excess of supply to demand.
Re: Allocation by Priority and Demand Values
We'll need the data file to run it.
/*
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: Allocation by Priority and Demand Values
Oh yes, sorry about that. Forgot to upload the data file as well.
- Attachments
-
- Natural Gas Price Database.xlsx
- (10.08 KiB) Downloaded 1255 times
Re: Allocation by Priority and Demand Values
I see what you mean - investigating.
/*
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: Allocation by Priority and Demand Values
Ah ... I should have seen this before. You're using the "Estimated Energy Price" in the Amount Supplied and Amount Demanded. But for the SUPPLY and DEMAND functions to work, they need the market clearing priority as input.
Fixing that reconciles the input/output discrepancy, but there's still something wrong. It could simply be that the demand priority is extremely low compared to the supply priorities.
Fixing that reconciles the input/output discrepancy, but there's still something wrong. It could simply be that the demand priority is extremely low compared to the supply priorities.
/*
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: Allocation by Priority and Demand Values
Yes - I think the problem is priorities that don't overlap. Demand has priority 0.1 with width .001, and all the supplies are at ~125 with width 1e-6. That yields a nonoverlapping set - there is no price at which demanders and suppliers want nonzero throughput.
/*
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: Allocation by Priority and Demand Values
I see. Thanks for the pointer!
So in order to generate a proper Supply at Price, the following things are important:
1) Supply at Price requires Market Clearing Priority as input.
2) ppriority of demand and supply curves should be in the same order of magnitude.
3) pwidth of demand and supply curves should be the same.
So in order to generate a proper Supply at Price, the following things are important:
1) Supply at Price requires Market Clearing Priority as input.
2) ppriority of demand and supply curves should be in the same order of magnitude.
3) pwidth of demand and supply curves should be the same.
Re: Allocation by Priority and Demand Values
Tom, thanks for the guidance. It was really useful.
I just tested it. Seems like for a dynamic input to supply curves priority would require a dynamic input to the demand curve priority. It did not occur to me that such a setup is required as I only had a single demander.
I tried using a dynamic value (like a base value similar to the supply curves' priority) which then grow at a rate such as the yearly demand growth rate. That did not seem too well in generating the supply at price output though. If I do set a high static value, I would get the error about the curves failing to converge. Is there a way to think about how to go about setting the right priority and width values for the demand curve in this case?
Another small question which might not be related to Vensim functionality directly. In your experience, would the effected LCOE or total variable cost be the right factor to use here for determining the supply curve priority values?
I have attached the updated model and database for your quick reference. Thanks!
I just tested it. Seems like for a dynamic input to supply curves priority would require a dynamic input to the demand curve priority. It did not occur to me that such a setup is required as I only had a single demander.
I tried using a dynamic value (like a base value similar to the supply curves' priority) which then grow at a rate such as the yearly demand growth rate. That did not seem too well in generating the supply at price output though. If I do set a high static value, I would get the error about the curves failing to converge. Is there a way to think about how to go about setting the right priority and width values for the demand curve in this case?
Another small question which might not be related to Vensim functionality directly. In your experience, would the effected LCOE or total variable cost be the right factor to use here for determining the supply curve priority values?
I have attached the updated model and database for your quick reference. Thanks!
- Attachments
-
- Henry Hub NG Price Data.xlsx
- (10.08 KiB) Downloaded 1041 times
-
- Electricity Market v2.mdl
- (173.46 KiB) Downloaded 1070 times
Re: Allocation by Priority and Demand Values
The allocation function section of the help explains the algorithm for market clearing.
https://www.vensim.com/documentation/fn_allocations.htm
Specifically:
https://www.vensim.com/documentation/24325.htm
On your points:
1) true
2) not strictly required, but should be true if you expect to see supply and demand fully utilized
3) not required
You can think of the priority as the price at which suppliers are willing to sell, or demanders are willing to purchase (except that it has to be dimensionless, rather than $/item). The with parameter essentially describes the variance among suppliers or demanders. So, with priority=100 and width = 10, supply ramps up between 95 and 105, for example. If you use Normal rather than Rectangular, this is a smoother process.
The problem with your original formulation was that suppliers were bidding $100/mwh, but demanders were willing to pay $0.1. So, given the narrow widths, there was no overlapping region with nonzero quantity.
https://www.vensim.com/documentation/fn_allocations.htm
Specifically:
https://www.vensim.com/documentation/24325.htm
On your points:
1) true
2) not strictly required, but should be true if you expect to see supply and demand fully utilized
3) not required
You can think of the priority as the price at which suppliers are willing to sell, or demanders are willing to purchase (except that it has to be dimensionless, rather than $/item). The with parameter essentially describes the variance among suppliers or demanders. So, with priority=100 and width = 10, supply ramps up between 95 and 105, for example. If you use Normal rather than Rectangular, this is a smoother process.
The problem with your original formulation was that suppliers were bidding $100/mwh, but demanders were willing to pay $0.1. So, given the narrow widths, there was no overlapping region with nonzero quantity.
/*
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: Allocation by Priority and Demand Values
Normally the LCOE or similar will determine investment in various sources.
In the short run, the decision to generate or not should be based only on variable costs (fuel, variable O&M).
In the short run, the decision to generate or not should be based only on variable costs (fuel, variable O&M).
/*
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: Allocation by Priority and Demand Values
Tom,
Thank you very much for the clarifications!
Thank you very much for the clarifications!