IF THEN ELSE with ALLOCATE AVAILABLE

Use this forum to post Vensim related questions.
Post Reply
Camila
Junior Member
Posts: 12
Joined: Tue Apr 21, 2009 8:45 pm

IF THEN ELSE with ALLOCATE AVAILABLE

Post by Camila »

Hello,

In order to speed up my model I would like to avoid calculating a dispatch (with Allocate Available) in every time step. So I am trying to do something like:

IF THEN ELSE(GET TIME VALUE(1,0,4)=1,
ALLOCATE AVAILABLE( Supply[Country,Tech], Supply Curve[Country,Tech,ptype], Demand[Country])
,0)

But I get this error: "Only expressions separated by commas are valid in this context"

Can you please help me solve this issue or give me ideas on how to speed up this function?

Thank you!
Administrator
Super Administrator
Posts: 4838
Joined: Wed Mar 05, 2003 3:10 am

Re: IF THEN ELSE with ALLOCATE AVAILABLE

Post by Administrator »

You cannot do an allocate available inside an if then else statement.

You could make DEMAND zero instead. That would speed things up as there would be nothing to allocate.

Tony.
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
Post Reply