Error with Allocate Available

Use this forum to post Vensim related questions.
Post Reply
Pruyn
Senior Member
Posts: 80
Joined: Fri Mar 05, 2004 2:34 pm

Error with Allocate Available

Post by Pruyn »

I use Allocate Available to divide available production capacity over the different projects. All worked fine untill I added a new part to my model, which is not involved in any feedback loop (yet). After I wanted to test this I got the following Error message.

ERROR: Error in ALLOCATE_AVAILABLE/FIND_MARKET_PRICE - subscript range error in request quantity.
ERROR: Floating point error computing - Potential Production[Yard10,ship2] - at time = 0.000000.
Trying to save the results anyway

Which seems strange to me, since it worked fine. I tried different time steps, different width/priorities and requests, but I keep getting this message.
I also don't know what the error points to, I use simple ranges, no subranges whatsoever.
Administrator
Super Administrator
Posts: 4590
Joined: Wed Mar 05, 2003 3:10 am

Post by Administrator »

Just a quick question, do you have the subscript orders correct?

Tony.
Pruyn
Senior Member
Posts: 80
Joined: Fri Mar 05, 2004 2:34 pm

Post by Pruyn »

I think so, also because before I added some new part it worked fine. But to be sure, here are the relevant equations:

Potential Priority of Ship[Yard,ship,ptype]=
1 ~~|
Potential Priority of Ship[Yard,ship,ppriority]=
zidz ( VMAX ( Time Left[Yard,ship!] ) - Time Left[Yard,ship] , VMAX ( Time Left[Yard
,ship!] ) ) ~~|
Potential Priority of Ship[Yard,ship,pwidth]=
1 ~~|
Potential Priority of Ship[Yard,ship,pextra]=
0
~ Dmnl
~ |

Potential Production[Yard,ship]=
ALLOCATE AVAILABLE(Potential Required Production[Yard,ship], Potential Priority of Ship
[Yard,ship,ptype], Production Limit for Capacity[Yard])
~ Ton/Month
~ |

Potential Required Production[Yard,ship] = xidz ( Work in Progress[Yard,ship] , Time Left
[Yard,ship] , Work in Progress[Yard,ship] / TIME STEP )
~ Ton/Month
~ |

Time Left[Yard,ship] =
0
~ Month
~ |

Work in Progress[Yard,ship] =
0
~ Ton
~ |

Production Limit for Capacity[Yard] =
100000
~ Ton/Month
~ |


Changing the values doesn't solve my problem and if I run it independently It works fine.
Administrator
Super Administrator
Posts: 4590
Joined: Wed Mar 05, 2003 3:10 am

Post by Administrator »

Can you provide the values of the inputs at the time it fails? Maybe there is a combination of vals that causes the problem.

Tony.
Pruyn
Senior Member
Posts: 80
Joined: Fri Mar 05, 2004 2:34 pm

Post by Pruyn »

Here are the values for the input.

Time (Month) 0
"Potential Priority of Ship[Yard,ship,PProfile]" Runs: Current
Potential Priority of Ship
[Yard10,ship1,ptype] 1
[Yard10,ship1,ppriority] --
[Yard10,ship1,pwidth] 1
[Yard10,ship1,pextra] 0
[Yard10,ship2,ptype] 1
[Yard10,ship2,ppriority] --
[Yard10,ship2,pwidth] 1
[Yard10,ship2,pextra] 0
[Yard10,ship3,ptype] 1
[Yard10,ship3,ppriority] --
[Yard10,ship3,pwidth] 1
[Yard10,ship3,pextra] 0
[Yard10,ship4,ptype] 1
[Yard10,ship4,ppriority] --
[Yard10,ship4,pwidth] 1
[Yard10,ship4,pextra] 0
[Yard10,ship5,ptype] 1
[Yard10,ship5,ppriority] --
[Yard10,ship5,pwidth] 1
[Yard10,ship5,pextra] 0

Time (Month) 0
"Potential Required Production[Yard,ship]" Runs: Current
Potential Required Production
[Yard10,ship1] 0
[Yard10,ship2] 0
[Yard10,ship3] --
[Yard10,ship4] --
[Yard10,ship5] --

Time (Month) 0
"Time Left[Yard,ship]" Runs: Current
Time Left
[Yard10,ship1] 0
[Yard10,ship2] 0
[Yard10,ship3] --
[Yard10,ship4] --
[Yard10,ship5] --
Administrator
Super Administrator
Posts: 4590
Joined: Wed Mar 05, 2003 3:10 am

Post by Administrator »

Is the "Time Left" parameter a data input?

There are no values listed for ppriority (which is calculated from "time left").

Maybe the function needs actual values in the inputs before calling the function (external functions do need values or you will cause a crash).

Tony.
bob@vensim.com
Senior Member
Posts: 1107
Joined: Wed Mar 12, 2003 2:46 pm

Post by bob@vensim.com »

Are you using 5.4b? There was a problem with earlier versions that used the wrong dimensions to determine size.

If you are then what are the subscript equations for ship, yard and ptype. Your equations look ok but the message indicates something is amiss (for example ship being a subrange).
Pruyn
Senior Member
Posts: 80
Joined: Fri Mar 05, 2004 2:34 pm

Post by Pruyn »

I'm using 5.4b

PProfile :
ptype, ppriority, pwidth, pextra
~
~ |

ship:
(ship1-ship25)
~
~ |

Yard: (Yard1-Yard10)
~
~ |

I have searched for subranges, but can't find any.
Pruyn
Senior Member
Posts: 80
Joined: Fri Mar 05, 2004 2:34 pm

Post by Pruyn »

The model will run if I change the ship subscript to ship1 only, not that's any good than.

changing to allocate by priority or another allocation type doesn't solve the problem either.

Would rebuilding the model from scratch do any good?

[Edited on 4-3-2005 by Pruyn]
bob@vensim.com
Senior Member
Posts: 1107
Joined: Wed Mar 12, 2003 2:46 pm

Post by bob@vensim.com »

I just tooka look at this and everything seems fine. In fact If I simply pasted in your equations (see attached) it also simulates fine.

This suggests one of two things to me. One is the subrange problem I mentioned earlier. The second is a symbolic simultaneous relationship that is not properly detected.

If the model is one that you can email to me (bob@vensim.com obviously) I would be happy to take a look at it. If not you might want to see if you can get a nonsensitive version of the model to display the problem.
Attachments
allocproblem.mdl
(2.86 KiB) Downloaded 543 times
warrick
Member
Posts: 21
Joined: Tue Jul 19, 2016 8:49 pm
Vensim version: DSS

Re: Error with Allocate Available

Post by warrick »

Hello,

Please refer to the link for background to my model:
http://www.ventanasystems.co.uk/forum/v ... 957#p22610

I am having the same error with Version 6.3 as discussed in this thread . It has been more than a decade but could you please indicate how this was resolved. Bob does the offer still stand to check the model?

I checked subscripts and divide by zeros. The error comes up with ALLOCATE AVAILABLE used to calculate electricity least cost dispatching. 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.

Regards
Warrick
Administrator
Super Administrator
Posts: 4590
Joined: Wed Mar 05, 2003 3:10 am

Re: Error with Allocate Available

Post by Administrator »

Please start a new thread if you have problems, this one is over ten years old and the participants have not visited the forum in many years.
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
warrick
Member
Posts: 21
Joined: Tue Jul 19, 2016 8:49 pm
Vensim version: DSS

Re: Error with Allocate Available

Post by warrick »

Thank you Adminstrator. I have done so at:
http://www.ventanasystems.co.uk/forum/v ... f=2&t=6356
Post Reply