Page 1 of 1

Deleting Used Time Series

Posted: Mon Jun 19, 2017 9:08 am
by Finn Weiss
Dear Rats Comunity,

i have following problem. I load data on a daily frequncy for every day between 01.01.2001 and 31.12.2013. I make a loop overall days and for every day there ist a series which is called for example: value20010101 , value20010102 and so on.
The Problem is, that i am running out of memory. So i want to delete the series from the memory when i go to the next step of the loop. I tried it with the release instruction but that failed. This is my code:
Optionsscheine.RPF
(3.79 KiB) Downloaded 942 times
Thanks for your Help

Re: Deleting Used Time Series

Posted: Mon Jun 19, 2017 12:40 pm
by TomDoan
What is it that you're trying to do? This is apparently reading a great deal of data (all the contents of a particular RATS format file over a very long stretch of time), and then you seem to be getting rid of the data that you just read.

data(format=rats) 1960:1:1 2074:12:31

Based upon what I see, it looks like you want to do something like what's described in

https://estima.com/docs/RATS 9 Users Guide.pdf#page=501

reusing a block of series with each trip through.

Re: Deleting Used Time Series

Posted: Tue Jun 20, 2017 6:43 am
by Finn Weiss
Yes something like that. Thanks to your help i can now load every series alone.
Still one question is left.
How can i erase the series out of my memory at the end of the loop?
I have the problem that all series are kept in the memory and so ther eis not enough left to run the file.

Re: Deleting Used Time Series

Posted: Tue Jun 20, 2017 8:11 am
by Finn Weiss
Something like the comand end(reset), but only for the variables which have been loaden with the comand open.

Re: Deleting Used Time Series

Posted: Wed Jun 21, 2017 11:51 am
by TomDoan
With your workspace size, each series is taking up roughly 250Kb. At a 2Gb total workspace for standard WinRATS, that's room for about 8000 series. Are you actually going through that many? It looks like the RELEASE isn't handling series correctly (as you note). However, you typically don't need to use that because things like VECT[SERIES] and RECT[SERIES] and the like are available to reuse series if you're doing this type of looping operation where a series is only used temporarily.

Re: Deleting Used Time Series

Posted: Mon Jun 26, 2017 1:42 am
by Finn Weiss
Okay. Is there maybe a function where can i load for example variable x and rename x to series y during the loading prozess. So that only y is saved into the working space?

Re: Deleting Used Time Series

Posted: Mon Jun 26, 2017 10:54 am
by TomDoan
That's what the LABELS instruction is used for in Section 15.3 in the User's Guide. It's the label of the series (not its name in the symbol table) that's used in pulling the data off the data file.