Page 1 of 1

FORECAST

Posted: Mon May 20, 2019 6:16 pm
by sankee82
Hi!
I have developed a model by giving the inputs of past 20 years. Now I want to predict the future by using FORECAST function. But when I am using FORECAST, the model starts predicting from the starting time instead of continuing from the Final Time step. Can you please help me in fixing this? The variables I am interested in forecasting are Levels/ Flows.

Thanks and Regards,
Sankeerthana.

Re: FORECAST

Posted: Mon May 20, 2019 6:43 pm
by Administrator
Can you upload the model to show us what you are doing?

Re: FORECAST

Posted: Tue May 21, 2019 5:31 am
by sankee82
Thanks for the response. I am herewith attaching the model. Can you please also elaborate the meaning of average time and Horizon used in FORECAST function? Is there any other function which can predict the future more effectively than FORECAST?

Re: FORECAST

Posted: Tue May 21, 2019 8:16 am
by Administrator
The average time and horizon are explained in the help system,
http://www.vensim.com/documentation/ind ... recast.htm

Can you tell us which variable in your model is the one you are forecasting?

Re: FORECAST

Posted: Tue May 21, 2019 9:14 am
by sankee82
I am trying to forecast "GW Storage", which is defines as a level. I am also interested in forecasting the other variables like Annual Yield, Annual Irrigation Cost per ha, etc.
Thank you!

Re: FORECAST

Posted: Tue May 21, 2019 9:26 am
by Administrator
I can see the forecast now. What is the problem with it, it looks to be calculating correctly. Do you want to use the actual value for GW storage until a certain time point (and then use the forecast)?

Re: FORECAST

Posted: Tue May 21, 2019 11:44 am
by sankee82
Yes! I want to use the actual value till certain time point and then predict the future.

Re: FORECAST

Posted: Tue May 21, 2019 2:04 pm
by Administrator
You can use IF THEN ELSE,

value = IF THEN ELSE ( time < time point, GW storage , forecasted GW storage )

Re: FORECAST

Posted: Wed May 22, 2019 2:40 pm
by sankee82
Thank you for the response. If I want to forecast the model for future time, is it necessary to give all the inputs till the end of future time? For example in the above model attached variables like Rainfall Intensity, Canal Water Release Rate, Temperature were given as direct inputs and when I am trying to use IF THEN ELSE the model is showing a warning of "Simulating beyond range for Exogenous Variables. I have historical data of that variables but I don't have future data. How to solve this problem?

Re: FORECAST

Posted: Wed May 22, 2019 6:19 pm
by Administrator
There is lots you can do with external data. See the following page for details on some of the equations you can use such as HOLD BACKWARD, INTERPOLATE etc.
http://www.vensim.com/documentation/ind ... ations.htm

This might also be useful,
http://www.vensim.com/documentation/ind ... issing.htm

http://www.vensim.com/documentation/ind ... n_data.htm

Re: FORECAST

Posted: Thu May 23, 2019 12:47 pm
by tomfid
In cases like this, I typically do something like the following:
last x time = GET DATA LAST TIME( x )
last x = SAMPLE IF TRUE( time = last x time, x, x )
trend x = TREND( x, horizon, init trend )
last trend x = SAMPLE IF TRUE( time = last x time, x, x )
forecast x = last x*(1+last trend x*MAX(0,time-last x time))