Question on GET XLS DATA

Use this forum to post Vensim related questions.
Post Reply
sibanez
Member
Posts: 34
Joined: Sun Jul 05, 2015 10:11 pm
Vensim version: PRO

Question on GET XLS DATA

Post by sibanez »

Hi again,

I am using a set of annual data in order to drive a model. I am using a time step equal to 0.0625 so that the model calculates 16 values per year/variable.

The point is that when I use the GET XLS DATA function with a set of data such as the one below:

Year Value
2000 5
2001 6
2002 7

Vensim does not hold the value of the variable constant along each year. For example in year 2000 the value increases in each time step from 5 until it reaches 6 in year 2001.

My question is: Is there any way to tell Vensim to keep the values constant until it gets a new value from GET XLS DATA? Otherwise it seems I'll have to build an Excel with 16 constant values per year in order to run the simulation

Thanks again,

Santiago
tomfid
Administrator
Posts: 3811
Joined: Wed May 24, 2006 4:54 am

Re: Question on GET XLS DATA

Post by tomfid »

sibanez
Member
Posts: 34
Joined: Sun Jul 05, 2015 10:11 pm
Vensim version: PRO

Re: Question on GET XLS DATA

Post by sibanez »

Can you please have a look at the model and Excel attached? I don't know what I'm doing wrong but if I table the 'Read data' variable I can only get the data at the specific years (2000. 2001. 2002. etc.)

There is no data at the intermediate values (2000.25, 2000,50, 2000.75, etc.) in case I use any of the options (Interpolate, hold backward, etc.)

Thanks

Santiago
Attachments
Test HOLD.mdl
(1.05 KiB) Downloaded 184 times
Data.xlsx
(8.73 KiB) Downloaded 194 times
tomfid
Administrator
Posts: 3811
Joined: Wed May 24, 2006 4:54 am

Re: Question on GET XLS DATA

Post by tomfid »

The data variable won't contain any interpolated or held points, but when it's used, you'll see them downstream.

For example, try:

myData := GET XLS DATA( ... )
myAux = myData

Then play around with the interpolation pattern and take a look at myAux.
sibanez
Member
Posts: 34
Joined: Sun Jul 05, 2015 10:11 pm
Vensim version: PRO

Re: Question on GET XLS DATA

Post by sibanez »

Ok. Got it now.

Thank you very much again!
Post Reply