Hello,
Please refer to the link for background to my model:
http://www.ventanasystems.co.uk/forum/v ... 957#p22610
I have the same error as a post of over a decade ago:
http://www.ventanasystems.co.uk/forum/v ... 633#p22633
Unfortunately, the solution is not provided. Hence this post. The actual error is:
"ERROR: Error in ALLOCATE_AVAILABLE/FIND_MARKET_PRICE - subscript range error in request quantity.
ERROR: Floating point error computing - Electricity Dispatched by Least Cost Vector[coal new] - at time = 2015.000000.
Trying to save the results anyway"
I checked subscripts and divide by zeros. The error comes up with ALLOCATE AVAILABLE used to calculate electricity least cost dispatching (as shown above). This ONLY occurs when I link the ALLOCATE AVAILABLE used to calculate required generation expansion upstream of least cost dispatching ALLOCATE AVAILABLE. If the output is not linked back then no problems. It is strange and seems to be a glitch of some sort. Please assist.
Let me know if I should send the model.
Regards
Warrick
Error with Allocate Available - subscript range error
Re: Error with Allocate Available - subscript range error
We'll need the model to see what's going on.
My suspicion is that the two ALLOCs you mention are overlapping somehow (i.e. share common variables that aren't stocks or constants). That causes problems, because you're then trying to solve one big simultaneous equation problem via two independent iterations.
My suspicion is that the two ALLOCs you mention are overlapping somehow (i.e. share common variables that aren't stocks or constants). That causes problems, because you're then trying to solve one big simultaneous equation problem via two independent iterations.
/*
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: Error with Allocate Available - subscript range error
Thank you for the reply tomfid.
I have attached the model with input data (excel spreadsheet).
The two ALLOCATIONS are for 1. Generation Capacity (new generation plants required to satisfy demand "New Allocated Capacity") and 2. Least Cost Dispatch (how to dispatch the generation plants in the system "Electricity Dispatched by Least Cost Vector"). Thus, item 1 feeds into item 2. When this feedback is made by including "New Allocated Capacity" into "New Generation Capacity" the error occurs. A similar approach was used in the EPS model (https://www.energypolicy.solutions/).
I think your suspicion regarding simultaneous equations may be valid but I am not sure how to fix it.
I look forward to your reply and getting this model working
I have attached the model with input data (excel spreadsheet).
The two ALLOCATIONS are for 1. Generation Capacity (new generation plants required to satisfy demand "New Allocated Capacity") and 2. Least Cost Dispatch (how to dispatch the generation plants in the system "Electricity Dispatched by Least Cost Vector"). Thus, item 1 feeds into item 2. When this feedback is made by including "New Allocated Capacity" into "New Generation Capacity" the error occurs. A similar approach was used in the EPS model (https://www.energypolicy.solutions/).
I think your suspicion regarding simultaneous equations may be valid but I am not sure how to fix it.
I look forward to your reply and getting this model working
Re: Error with Allocate Available - subscript range error
Got it. I don't get the same error though. What version are you running?
Code: Select all
ERROR: Simultaneous equations involving: Contracted Dispatch Quantity by Priority[coal,new,priority1].
: Electricity Dispatched by Contract Priority[coal,new,priority1].
: Output Generation by Type[coal,new].
: Actual Capacity Factor[coal,new].
: "Annulized Fixed Costs per MWh - Actual CF"[coal].
: "LCOE - Actual CF"[coal].
: New Output Priority Profile[coal,ppriority].
: New Output Allocated[coal].
: New Allocated Capacity[coal].
: New Generation Capacity[coal,new].
: Generation Capacity[coal,new].
: Potential Electricity Output by Type[coal,new].
: Contracted Dispatch Quantity by Priority[coal,new,priority1].
ERROR: Simultaneous equations involving: Electricity Dispatched by Least Cost Vector[coal new].
: Electricity Dispatched by Least Cost[coal,new].
: Output Generation by Type[coal,new].
: Actual Capacity Factor[coal,new].
: "Annulized Fixed Costs per MWh - Actual CF"[coal].
: "LCOE - Actual CF"[coal].
: New Output Priority Profile[coal,ppriority].
: New Output Allocated[coal].
: New Allocated Capacity[coal].
: New Generation Capacity[coal,new].
: Generation Capacity[coal,new].
: Potential Electricity Output by Type[coal,new].
: Potential Electricty Output by Type after Contract Based Dispatch[coal,new].
: Temp Vector Potential Electricity[coal new].
: Electricity Dispatched by Least Cost Vector[coal preexisting].
: Electricity Dispatched by Least Cost[coal,preexisting].
: Output Generation by Type[coal,preexisting].
: Actual Capacity Factor[coal,preexisting].
ERROR: Simultaneous equations involving: "Annulized Fixed Costs per MWh - Actual CF"[coal].
: "LCOE - Actual CF"[coal].
: New Output Priority Profile[coal,ppriority].
: New Output Allocated[coal].
: New Allocated Capacity[coal].
: New Generation Capacity[coal,new].
: Generation Capacity[coal,new].
: Potential Electricity Output by Type[coal,new].
: Potential Electricty Output by Type after Contract Based Dispatch[coal,new].
: Temp Vector Potential Electricity[coal new].
: Electricity Dispatched by Least Cost Vector[coal preexisting].
: Electricity Dispatched by Least Cost[coal,new].
: Output Generation by Type[coal,new].
: Actual Capacity Factor[coal,new].
: "Annulized Fixed Costs per MWh - Actual CF"[coal].
/*
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: Error with Allocate Available - subscript range error
Here's a version with the first simultaneous loop highlighted in red.
The conceptual issue here is that you're treating the flow of capacity installation like a stock, with *one year as a units converter to conceal the mismatch between MW and MW/year. This means that the need for capacity is perceived and capacity is installed and allocated all in the same instant. I think if you treat capacity conventionally, as a stock, the problem will be solved.
The diagram is very readable, but the way this feedback loop jumps around suggests to me that shadow variables have been overused.The conceptual issue here is that you're treating the flow of capacity installation like a stock, with *one year as a units converter to conceal the mismatch between MW and MW/year. This means that the need for capacity is perceived and capacity is installed and allocated all in the same instant. I think if you treat capacity conventionally, as a stock, the problem will be solved.
/*
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: Error with Allocate Available - subscript range error
Thank you so much tomfid. The model is working!
I am using Vensim DSS for Windows Version 6.3 (x32). The simultaneous equation error is a lot more useful than "ALLOCATE_AVAILABLE/FIND_MARKET_PRICE" error. It is strange that the former did not show with my version as I did have such an error with a previous more direct simultaneous equation.
The issue was the feedback coming via the capacity factor "Actual Capacity Factor" which was used to calculate "Annualized Fixed Costs per MW" and eventually feed into the priority profile for capacity allocation. I rather used the target capacity factors and problem solved. I wanted to use the actual capacity factors as when there is ample generation capacity from a demand perspective the lower marginal costs units would be dispatched first and reach their target capacity factors but the higher marginal costs units would not achieve theirs. However, actual capacity factor would not really solve the problem either as only one year is considered. The better approach would be to consider the entire time period (all actual capacity factors). This I am investigating with the optimiser as discussed in previous post (http://www.ventanasystems.co.uk/forum/v ... f=2&t=6349). Still busy on that one.
Thanks again.
I am using Vensim DSS for Windows Version 6.3 (x32). The simultaneous equation error is a lot more useful than "ALLOCATE_AVAILABLE/FIND_MARKET_PRICE" error. It is strange that the former did not show with my version as I did have such an error with a previous more direct simultaneous equation.
The issue was the feedback coming via the capacity factor "Actual Capacity Factor" which was used to calculate "Annualized Fixed Costs per MW" and eventually feed into the priority profile for capacity allocation. I rather used the target capacity factors and problem solved. I wanted to use the actual capacity factors as when there is ample generation capacity from a demand perspective the lower marginal costs units would be dispatched first and reach their target capacity factors but the higher marginal costs units would not achieve theirs. However, actual capacity factor would not really solve the problem either as only one year is considered. The better approach would be to consider the entire time period (all actual capacity factors). This I am investigating with the optimiser as discussed in previous post (http://www.ventanasystems.co.uk/forum/v ... f=2&t=6349). Still busy on that one.
Thanks again.