Repeating LOOKUP TABLE

Use this forum to discuss any issues relating to Systems Dynamics and Systems Thinking.
Post Reply
cerrem
Junior Member
Posts: 2
Joined: Fri Apr 22, 2022 8:23 pm
Vensim version: PLE

Repeating LOOKUP TABLE

Post by cerrem »

Hi..
I have a LOOKUP TABLE that has 20 data pairs....
This is based by the HOUR..
I entering the data for 24 hours..
Since this data repeats exactly the same for each 24 hours, I need to repeat this data for a week and then up to a month..
Entering all this data manually would be very time consuming and inefficient.
Is there a way to have the same data "recycle" every 24 hours ??

Thanks in advance...
Best Regards
Administrator
Super Administrator
Posts: 4573
Joined: Wed Mar 05, 2003 3:10 am

Re: Repeating LOOKUP TABLE

Post by Administrator »

How is time measured in your model? Is it by hour? If yes, you can use the MODULO function to get the hour of the day, and pass that into the lookup function.
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
cerrem
Junior Member
Posts: 2
Joined: Fri Apr 22, 2022 8:23 pm
Vensim version: PLE

Re: Repeating LOOKUP TABLE

Post by cerrem »

Hi..
Yes, it is by the hour... Here it is :
[(0,0)-(10,10)],(0,7.77778e+06),(2,5.28e+06),(4,4.4444e+06),(6,5.33328e+06),(8,1.06666e+07),(9,1.05555e+07),(10,1e+07),(16,9.44435e+06),(20,1.6e+07),(21,1.55554e+07),(24,8.44436e+06)

0 to 24 hours with Power in the Y-co-ordinate...
I have data for each hour, but in the interest of simplification I used fewer hours in the day to put together a crude Piece-Wise function..
I need to continue the same Y-co-ordinates but up to 168 Hours for one week and maybe up to a month..
I am interested in learning more about the MODULO function and how to apply it..
Many Thanks..
tomfid
Administrator
Posts: 3806
Joined: Wed May 24, 2006 4:54 am

Re: Repeating LOOKUP TABLE

Post by tomfid »

If you wanted something to repeat every week, you could use something like,

work time = daily work lookup( MODULO( hour, one week ) )

Where hour (units of hours obviously) would be the hour of the week, and one week would be the length of a week in hours. The MODULO function would then repeat on the interval 0 to <168 hours, and the lookup would have that range as its x-axis.

Lots of other variations are possible, depending on the units that are most convenient.
fipac
Junior Member
Posts: 7
Joined: Thu Sep 08, 2022 9:47 pm
Vensim version: PLE

Re: Repeating LOOKUP TABLE

Post by fipac »

Hi, does anyone know if the same as above (lookup using MODULO) can be done by reading the data from a CSV ?
Administrator
Super Administrator
Posts: 4573
Joined: Wed Mar 05, 2003 3:10 am

Re: Repeating LOOKUP TABLE

Post by Administrator »

Vensim PLE cannot read CSV data.
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
fipac
Junior Member
Posts: 7
Joined: Thu Sep 08, 2022 9:47 pm
Vensim version: PLE

Re: Repeating LOOKUP TABLE

Post by fipac »

Any example on how that can be achieved in a non-PLE version?
Post Reply