Page 1 of 1

Giving Excel Data

Posted: Thu Mar 14, 2019 6:55 pm
by sankee82
When I am trying to give excel data to the variables of my model, it is giving an error that 'Simulation starts before first time for exogenous variable' and the table of that variable is not showing any values. Can you please help me with this?

Thanks and Regards,
Sankeerthana.

Re: Giving Excel Data

Posted: Thu Mar 14, 2019 7:05 pm
by tomfid
This means that the time over which your data is available does not correspond to the time axis of the model. You will get that warning if, for example, your model starts in 1990 but your oil price data starts in 2010.

Re: Giving Excel Data

Posted: Thu Mar 14, 2019 7:22 pm
by sankee82
Thank you so much. Can you please let me know how to make sure that the time period is same for both the model and data available?

Re: Giving Excel Data

Posted: Thu Mar 14, 2019 7:34 pm
by tomfid
The model time is in Model>Settings>Time Bounds

The data time horizon will be in your spreadsheet. Model and data time units have to match. Excel dates generally won't work, because internally they are a number representing the days elapsed since Jan 1 1900.

Re: Giving Excel Data

Posted: Fri Mar 15, 2019 9:24 am
by sankee82
While giving GET XLS DATA command, the format is GET XLS DATA( {'filename'} , {'tabname'} , {'time_row_or_col'} , {'first_data_cell'} ) where time row/column is the row/column that stores the value of the variable. Then how is Vensim matching the units of the date as I am not providing any information regarding data?

Re: Giving Excel Data

Posted: Thu Mar 21, 2019 5:19 pm
by Quame
tomfid wrote: Thu Mar 14, 2019 7:34 pm The model time is in Model>Settings>Time Bounds

The data time horizon will be in your spreadsheet. Model and data time units have to match. Excel dates generally won't work, because internally they are a number representing the days elapsed since Jan 1 1900.
Thanks tomfid. I am having similar issue, so how do you ensure that the dates in excel and model match?

Re: Giving Excel Data

Posted: Mon Mar 25, 2019 5:02 pm
by tomfid
Two options:

1. Run the model in days, using the same numbering as Excel dates. (An Excel date is really a number like 34582.)

2. In Excel, create a time row/column that translates dates to a decimal year, week, etc. For example, if cell A2 contains a date, you could translate that to a decimal year via YEAR(a2) + MONTH(a2)/12.

#2 is usually preferred.

Re: Giving Excel Data

Posted: Mon Mar 25, 2019 5:53 pm
by Quame
Okay thanks a lot