Please help! How to repeat a series of data

Use this forum to post Vensim related questions.
Post Reply
kelseyg
Junior Member
Posts: 10
Joined: Wed Nov 05, 2014 11:27 am
Vensim version: PRO

Please help! How to repeat a series of data

Post by kelseyg »

I have a series of data, e.g.: 1 on day1; 2 on day2; 3 on day3....7 on day7

And this set repeats every day, which means the real input data would be like the sum of each repeat:
11111111.png
11111111.png (11.46 KiB) Viewed 2948 times
Is it possible to generate this as the input of a variable?
Many thanks!! :D
tomfid
Administrator
Posts: 3816
Joined: Wed May 24, 2006 4:54 am

Re: Please help! How to repeat a series of data

Post by tomfid »

Here's one option: http://www.ventanasystems.co.uk/forum/v ... f=2&t=5930

Your pic is ambiguous - if you indicate the desired output as well as input, it would help.
kelseyg
Junior Member
Posts: 10
Joined: Wed Nov 05, 2014 11:27 am
Vensim version: PRO

Re: Please help! How to repeat a series of data

Post by kelseyg »

Hi thanks for the reply!

I guess my problem is slight different, as the dataset doesn't repeat on the 8th day.
It repeats on the next day, so the result would be the sum of every rows.

hope I describe it clearly.... :shock:
tomfid
Administrator
Posts: 3816
Joined: Wed May 24, 2006 4:54 am

Re: Please help! How to repeat a series of data

Post by tomfid »

So for the example given, would the output be 1, 3, 6, ... ?

You haven't specified whether the blanks are 0s, or what happens after 7.

I'd recommend posting a spreadsheet (or screenshot of one) showing exactly what you want.
kelseyg
Junior Member
Posts: 10
Joined: Wed Nov 05, 2014 11:27 am
Vensim version: PRO

Re: Please help! How to repeat a series of data

Post by kelseyg »

Yes, that's exactly what I mean. :D
The set is just 7 number long, so blank means zero. Data would be like 1, 3, 6....
tomfid
Administrator
Posts: 3816
Joined: Wed May 24, 2006 4:54 am

Re: Please help! How to repeat a series of data

Post by tomfid »

Is there a reason you can't just use the sums 1, 3, 6 ... directly?

It's still not clear to me what we're trying to do here. Some context would help.

In general, when something repeats like this, it makes sense to use a lookup, with the input given by MODULO(time,repeat period) or something like that.
kelseyg
Junior Member
Posts: 10
Joined: Wed Nov 05, 2014 11:27 am
Vensim version: PRO

Re: Please help! How to repeat a series of data

Post by kelseyg »

Hi,
Thank you very much for your reply. You are always very helpful and give in-time replies.
As you suggested, I computed the output data and used it as the variable input, and it works! Thanks!
Post Reply